I tried using the Toggle mark occurrences (Alt + Shift + O) button and also in Preferences -> General -> Editors -> Text Editor -> Annotations
Toggle mark occurrences (Alt + Shift + O)
Preferences -> General -> Editors -> Text Editor -> Annotations
For Eclipse Mars:
Window --> Preferences --> Check (Mark occurrences of the selected element in the current file.)
As shown if figure: