Eclipse: activate highlight references (variable, types,…) in eclipse

There is a very useful functionality in eclipse: If you click on an element in the code (variable, type, method, etc.) it highlights all of its occurrences in the same file so you can find them with no pain.

But sometimes, due to some action you did by mistake, this functionality can be disabled. And now you don’t know how to reactivate it. Well, here are the solutions:

  1. Type on you keyboard alt-shift-o (windows) or opt-cmd-o (mac)
  2. or you can go to Window/Eclipse -> Preferences -> Java/Php -> Editor -> Mark Occurrences and then select what you want it to be highlighted.


Leave a Reply