Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324838 - Uncommenting with empty lines works unexpectedly
Summary: Uncommenting with empty lines works unexpectedly
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 7.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: Markus Schorn CLA
QA Contact: Anton Leherbauer CLA
URL:
Whiteboard:
Keywords:
Depends on: 325438
Blocks:
  Show dependency tree
 
Reported: 2010-09-09 07:17 EDT by Markus Schorn CLA
Modified: 2010-11-04 04:51 EDT (History)
1 user (show)

See Also:


Attachments
workaround until platform bug is fixed. (3.02 KB, patch)
2010-09-16 07:36 EDT, Markus Schorn CLA
mschorn.eclipse: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Schorn CLA 2010-09-09 07:17:47 EDT
Use a file with 3 lines:
int a;

//

Select the first 2 lines such that the cursor is at the beginning of the 3rd line and press ctrl+/. The first line is commented.
//int a;

//

Now, without changing the selection (still 2 lines are selected, cursor at beginning of 3rd line) press ctrl+/, again. The first line is commented again, I'd expect it to be uncommented:
////int a;

//
Comment 1 Anton Leherbauer CLA 2010-09-13 04:32:54 EDT
I think this is basically the same issue I mentioned in bug 323456 comment 3.  This might require a fix in the platform.
Comment 2 Markus Schorn CLA 2010-09-16 07:36:12 EDT
Created attachment 179023 [details]
workaround until platform bug is fixed.
Comment 3 Markus Schorn CLA 2010-09-16 07:37:00 EDT
The workaround does not change the fact that the last line is not commented. However immediately uncommenting it works.
Comment 4 CDT Genie CLA 2010-09-16 19:23:08 EDT
*** cdt cvs genie on behalf of mschorn ***
Bug 324838: Workaround for platform issue in commenting code.

[*] ToggleCommentAction.java 1.15 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ToggleCommentAction.java?root=Tools_Project&r1=1.14&r2=1.15
Comment 5 Markus Schorn CLA 2010-11-04 04:51:03 EDT
Workaround has been removed by fix for bug 323456. The issue is resolved with Platform 3.7m3.