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 action I have now disabled it. Is there a way I can enable it?
I tried searching Google, but since I don't know what the feature is called, its kinda tough.
Its a really useful feature, and its annoying that its not working.
Glance does not work anymore, but in current Eclipse Versions (Eclipse 2020) you can highlight any word by selecting the word and pressing CTRL+F.
Alt + Shift + O disables and enables this feature, which is called Mark Occurrences. There is also a toolbar button to toggle it on and off.
If you're using eclipse with PHP package and want to change highlighted colour then there is slight difference to above answer. Go to General > Editors > Text Editors > Annotations. Now look for "PHP elements 'read' occurrences" and "PHP elements 'write' occurrences". You can select your desired colour there.
This is activated because of code coverage. If you want to remove it then follow these steps. Go to "Windows -> Show View -> Coverage" Select it.
There's a little "highlighter" icon on the toolbar - it toggles "Mark Occurrences".
From the preferences window, the feature you mean is configured by navigating to:
Window -> Preferences -> Java -> Editor -> Mark Occurrences
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With