Community
Participate
Working Groups
Make the labels of "macro" visually different by adding parentheses after the name. This was requested before in Bug 26482 #define DOUBLE(a) (2*a) This should show up in the UI as DOUBLE(). I think we should not show the parameter names as we don't show them in function labels. Just the type is shown there and we have no type here. Refer to Bug 26482 comment 3: "2) ... , but I still miss the second part of bullet 2, making a difference between "macros" and "pure defines". What I mean is something like: #define RANDOM_NUMBER 4711 #define DOUBLE(a) (2*a) has a quite distinct "semantic" meaning in the source code, and that this should be represented in the outline. At a minimum, DOUBLE should be shown as "DOUBLE(a)" and not just "DOUBLE". Even nicer would be if the icons were somehow different."
Created attachment 181304 [details] proposed patch There might be better ways to implement this. Feedback is very welcome.
Thanks, I have committed your patch. Implemented in 8.0 > 20101021
*** cdt cvs genie on behalf of mschorn *** Bug 328259: Differentiate function-style and object-style macros, by Patrick Hofer. [*] BasicOutlineTest.java 1.3 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/outline/BasicOutlineTest.java?root=Tools_Project&r1=1.2&r2=1.3 [*] CElementLabelComposer.java 1.3 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CElementLabelComposer.java?root=Tools_Project&r1=1.2&r2=1.3 [*] IMacro.java 1.6 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMacro.java?root=Tools_Project&r1=1.5&r2=1.6 [*] MacroHandle.java 1.2 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ext/MacroHandle.java?root=Tools_Project&r1=1.1&r2=1.2 [*] Macro.java 1.7 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Macro.java?root=Tools_Project&r1=1.6&r2=1.7 [*] CModelBuilder2.java 1.52 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelBuilder2.java?root=Tools_Project&r1=1.51&r2=1.52