Listing write references [message #714305] |
Wed, 10 August 2011 09:37 |
kolsrud Messages: 1 Registered: August 2011 |
Junior Member |
|
|
Hi! I'm rather new to CDT, and I'm looking for a way to get a list of all references to a variable that updates the variable. So for instance, if I ask for write references for "x", I would like "x = 0;" to be listed but not "y = x;". Is there a way to do this?
I have been experimenting a little with creating a plug-in for this to be able to add a menu item similar to References and Declarations in the right button menu, and I ran into this method, which seems to do something along this line:
StyledString org.eclipse.cdt.internal.ui.search.PDOMSearchLabelProvider.getStyledText(Object element)
At least it checks a isWriteAccess property that I would like to use, but I don't understand where or when the color properties are used.
Styler style = match.isWriteAccess() ? ColoringLabelProvider.HIGHLIGHT_WRITE_STYLE : ColoringLabelProvider.HIGHLIGHT_STYLE;
Any help would be greatly appreciated!
Best regards,
Øystein Kolsrud
|
|
|
Powered by
FUDForum. Page generated in 0.02623 seconds