Community
Participate
Working Groups
E.g. #define M(a,b) a=b void f() { int a,b; M(a,b); a=b; } void g() {} Put the cursor on the M(a,b) macro expansion. Expanding the selection works OK until all of the macro expansion is selected, any further expansion (enclosing, next or previous element) will select the whole file. Starting from a normal code location (e.g. a=b;) works OK. Another observation: Expanding the selection beyond the whole file multiple times seems to add each attempt to the history although the selection did not actually change, i.e. to restore the previous selection I have to hit Alt+Shift+Down multiple times.
Hmm, the current node selector does not provide a method to find the enclosing node for the macro expansion. I need to add one.
Created attachment 177514 [details] fix
Fixed in 8.0 > 20100826.
*** cdt cvs genie on behalf of mschorn *** Bug 322750: Expanding selection with macro expansion. [*] StructureSelectEnclosingAction.java 1.2 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/StructureSelectEnclosingAction.java?root=Tools_Project&r1=1.1&r2=1.2 [*] ASTNodeSpecification.java 1.5 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNodeSpecification.java?root=Tools_Project&r1=1.4&r2=1.5 [*] ASTNodeSelector.java 1.8 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNodeSelector.java?root=Tools_Project&r1=1.7&r2=1.8 [*] IASTNodeSelector.java 1.6 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTNodeSelector.java?root=Tools_Project&r1=1.5&r2=1.6