Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Listing write references
Listing write references [message #714305] Wed, 10 August 2011 09:37
kolsrud is currently offline kolsrudFriend
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
Previous Topic:I want to see makefile generator code in CDT.
Next Topic:Add keywords to asm editor
Goto Forum:
  


Current Time: Fri Apr 26 21:37:42 GMT 2024

Powered by FUDForum. Page generated in 0.02623 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top