Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 264147 - CDT Editor in Column/Block Edit Mode
Summary: CDT Editor in Column/Block Edit Mode
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 6.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 6.0   Edit
Assignee: Anton Leherbauer CLA
QA Contact: Anton Leherbauer CLA
URL:
Whiteboard:
Keywords:
Depends on: 264168
Blocks:
  Show dependency tree
 
Reported: 2009-02-09 05:21 EST by Henning Riedel CLA
Modified: 2009-05-27 16:53 EDT (History)
1 user (show)

See Also:
cdtdoug: iplog-


Attachments
Fix for issue#1 (5.78 KB, patch)
2009-02-10 04:44 EST, Anton Leherbauer CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Henning Riedel CLA 2009-02-09 05:21:01 EST
Eclipse 3.5.0M5 + CDT 6.0M5 Candidate

Hurray, we got an column edit mode in Eclipse now.

Hmm, but somehow, it's not working for all circumstances:
1. Open a C file.
2. Hit <Alt>+<Shift>+A to go into Column Edit Mode
3. Use the <Shift>+<Down> to mark several lines.
4. Enter e.g. #define FOO(  
Note: The opening parenthesis does not have to be at FOO, 
like
  #define FOO(x) foo_##x 
it could also be a macro like
  #define FOO    (1 << 0)
  #define BAR    (1 << 1)

As you can see, opening the parenthesis removes all lines but the first one, and marks the () for input completion or whatever this is now called. You know, the one where on finishing the input by hitting <Enter> and it moves behind the closing parenthesis.
But, it only happens if the line is empty, e.g. do the following:
1.) In the file, still in Column Edit Mode, mark two line by <Shift>+<Down>.
2.) Enter e.g. #define FOO  1 << 0
3.) Mark the two lines again before the 1, and enter (.

Nothing is deleted now.


Next problem is, under this edit mode, like:
#define FOO  (1 << 0)
#define BAR  (1 << 1)
Now, go to the opening parenthesis mark both line by Shift+cursor-down. Hit <TAB> and see how the lines are indented from column 0, but not from the position on marked by the cursor.
Comment 1 Anton Leherbauer CLA 2009-02-09 09:19:08 EST
The same happens with the Java Editor (bug 264168).
Comment 2 Anton Leherbauer CLA 2009-02-10 04:44:07 EST
Created attachment 125213 [details]
Fix for issue#1

The second issue (shift right instead of insert TAB) is in platform domain.
Comment 3 Anton Leherbauer CLA 2009-03-10 10:57:15 EDT
Marking fixed. Issue #2 is covered by bug 264168.