Community
Participate
Working Groups
Enhance the current "Mark occurrences" implementation to show write accesses in a different color as in JDT. Patch is following.
Created attachment 178567 [details] proposed patch
Nice! One problem I see is that we need to differentiate between C and C++ when determining the access type, i.e. use CPPVariableReadWriteFlags for ICPPVariables and CVariableReadWriteFlags otherwise. Please also have a look at MarkOccurrenceTest in org.eclipse.cdt.ui.tests. The patch makes some of the tests fail, because a few occurrences are mapped to the new annotation type. This needs to be adjusted.
Created attachment 178999 [details] updated patch Thanks for the feedback. The updated patch should address the issues in comment#2. I took the chance to enhance the MarkOccurrenceTest to check the new markers as well. Those tests run very slow btw. Any idea how to speed them up?
Great, I committed your patch to HEAD. Thanks for contributing! I believe the tests run slowly because they need to wait for the reconciler and for the post selection listener which are both delayed a few hundred ms.
*** cdt cvs genie on behalf of aleherbau *** Bug 324905 - [Search] Show different colors to mark read and write accesses in Mark Occurrences Patch from Patrick Hofer [*] CSearchMessages.properties 1.44 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchMessages.properties?root=Tools_Project&r1=1.43&r2=1.44 [*] IOccurrencesFinder.java 1.4 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/IOccurrencesFinder.java?root=Tools_Project&r1=1.3&r2=1.4 [*] OccurrencesFinder.java 1.8 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/OccurrencesFinder.java?root=Tools_Project&r1=1.7&r2=1.8 [*] CSearchMessages.java 1.16 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchMessages.java?root=Tools_Project&r1=1.15&r2=1.16 [*] CEditor.java 1.218 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditor.java?root=Tools_Project&r1=1.217&r2=1.218 [*] plugin.properties 1.206 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.ui/plugin.properties?root=Tools_Project&r1=1.205&r2=1.206 [*] plugin.xml 1.388 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.ui/plugin.xml?root=Tools_Project&r1=1.387&r2=1.388 [*] occurrences.cpp 1.6 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.ui.tests/resources/ceditor/occurrences.cpp?root=Tools_Project&r1=1.5&r2=1.6 [*] MarkOccurrenceTest.java 1.13 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/MarkOccurrenceTest.java?root=Tools_Project&r1=1.12&r2=1.13