Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 223052

Summary: [editor] Select enclosing element
Product: [Tools] CDT Reporter: Anton Leherbauer <aleherb+eclipse>
Component: cdt-coreAssignee: Project Inbox <cdt-core-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3 CC: eclipse.sprigogin, elaskavaia.cdt, shawnmm, yevshif
Version: 5.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Anton Leherbauer CLA 2008-03-18 04:17:05 EDT
The Java Editor provides a command to expand the selection to the enclosing element (Alt+Shift+Up). This would be nice for the C/C++ Editor, too.
Comment 1 Shawn McCarney CLA 2010-08-19 12:21:47 EDT
Any new status on this?  This feature would be very helpful.

Common Use Case:

* User editing large, complex function in a C/C++ file

* User wants to select (highlight) current block of code.  Everything between the innermost set of braces/brackets or parentheses.

* User would also like to be able to repeat the key-stroke to select the next scope outward.  For example, go from selecting the innermost block to an enclosing if/else.

This action is bound to Alt+Shift+Up for both the Java editor and general Structured Text editors.  It would be really nice to have this supported by the C/C++ editor.

Thanks, Shawn.
Comment 2 Elena Laskavaia CLA 2010-08-19 13:49:42 EDT
It is committed under the other bug number in cdt 8.0. have to find it...
Comment 4 Anton Leherbauer CLA 2010-08-20 02:35:44 EDT

*** This bug has been marked as a duplicate of bug 321881 ***