I have an odd problem. In Eclipse Ganymede, I used to be able to highlight a variable, and it would highlight the use of that variables in that method. However through some
In addition, you have to go to General->Editors->Text Editors->Annotations, choose Occurrences and check the "Text as" and choose Highlighted. This will make you happy.
I had this too and my Mark Occurrence options were already all checked. As always, try restarting Eclipse, it worked for me.
EDIT: It actually kinda worked. There's a bug on Eclipse that when you open a project in a new window (in case your first Eclipse window is a mess full of projects) it starts not to work. In case you need you can select an item and toggle the highlighter in the toolbar or use Alt+Shift+O, but you're gonna have to do it every time you select an item.
Press alt-shift-O.
It toggles the "Mark Occurrences" feature of Eclipse; which provides the highlighting functionality you're missing.
There's a little "highlighter" icon on the toolbar - it toggles "Mark Occurrences".
You probably accidentally pressed it when trying to select a menu item at some point. I had a friend who did that with the "show selected element only" toolbar button...
You can either press it again or configure as Rytmis says.
That is probably how the 'mark occurences' got turned off... I was using Ctrl+Shift+O to organize imports and by mistake chosen Alt instead of Ctrl. So it can be turned on again by Alt+Shift+O.
To me it didn't work anymore because there was an error in the code. It generally works, but sometimes it might not, make sure your code has no errors if nothing else works.