There are two ways to highlight all occurences. First is using Eclipse options, which is not very reliable, because in many versions of Eclipse it is not supported.
Second is using a plugin called Glance which is available in Eclipse marketplace. This is supereasy and effective.
First Method
In the toolbar, there is button for Toggling Mark Occurrences
. So, once you selected the text/word whose occurences you wish to highlight, then click this toggle button.

Let's say this step doesn't work for you. Then, Follow this step:
Goto: Window
==> Preferences
==> General
==> Editors
==> Text Editors
==> Annotations
==> On right Annotations types box: Occurrences
==> Select all check boxes.

You can also go to Window
==> Preferences
==> Java
==> Editor
==> Mark Occurrences
==> Check all the checkboxes.

Restart Eclipse and check if highlighting works.
If still doesn't work, then Go to Second Method
Second Method
From Eclipse marketplace, install Glance
. Once installed, restart Eclipse.
Now select any word in your eclipse editor
- Move focus to component where you want to search
- Open Glance using
Ctrl + Cmd + F
shortcut on Mac or Ctrl + Alt + F
on other platforms
- Enter text you want to search
- Use
Enter
or **Shift + Enter**
to find next/previous match
- Close search box using
Esc
You can also customize Glance from Window
==> Preferences
==> Glance