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
Go
Java> Editor > Mark Occurrences
Uncheck "Keep Marks when the section changes" then click Ok
Restart Eclipse.
This work for me.