score:622

Accepted answer

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

screen shot

score:0

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.

score:1

i had a similar problem. i solved it by uninstalling the erlang plugin called "erlide".

score:1

i had the similar problem where the references were not highlighted, on enabling the mark occurrences in windows-prefrences-java-editor i am able to highlight the references

score:2

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.

score:4

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.

score:8

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.

score:11

on mac os it's opt-cmd-o i pressed that once by mistake, thanks to this question i found my way back

score:18

  • in eclipse kepler,
    you can simply use the "toggle mark occurrences" icon on the tool bar or you can use keyboard short cut alt+shift+o.

    enter image description here

  • window > preferences > java > editor > mark occurrences. enable "mark occurrences of the selected element in the current file" and click apply.

    enter image description here

score:107

press alt-shift-o.

it toggles the "mark occurrences" feature of eclipse; which provides the highlighting functionality you're missing.

score:142

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.


Related Query

More Query from same tag