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.
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.
I've been working with Eclipse for quite a while and I'm pretty certain that there is no canonical way of doing this.
In Eclipse these things are managed on a per-editor basis and the Java editor does not support what your looking for for all I know. At least for the Java editor you can do some minor configuration in what is highlighted and how (Preferences > Java > Editor > Mark Occurrences
), but I guess you already know that.
As for plugins, I'm not aware of any plugin that achieves what you're looking for. As a matter of fact I'd be surprised if there really was a plugin which achieves what you're looking for.
If something comes up I'd much appreciate you sharing it here, I've been trying to get decent highlighting into Eclipse for years unsuccessfully... :)
Here is a plugin for eclipse: http://ystrot.github.io/glance/
It highlights all occurrences as with notepad++ upon hitting Ctrl + Alt + F.
If you enable "Mark Occurrences" , then all words that are the same as the one you have marked will be highlighted.
You can enable it in two following ways
Alt + Shift + O
Preferences > Java > Editor > Mark Occurrences
Below is what I found works for me but you can also assign a key shortcut to 'Find Text in File':
CTR+3
to activate 'Quick Access' searchAs mentioned by @Kislingk you can modify how the words are highlighted/marked in 'Preferences > General >Editors>Text Editors > Annotations'.
Here is the closest solution I have found:
Create a shortcut in Preferences/General/Keys type in the search field: "Find Text in File" By default it has nothing assigned so just assign your key binding to it.
Annotations can help with displaying it in the sidebar
Use file search to search selected resource can highlight same word in single file.
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