If you search for a String in Netbeans Java editor, it automatically highlights all occurrences of that string.
But, how can I achieve this feature in Eclipse?
eclipse instasearch plugin is a very useful plugin for search needs inside eclipse. It is based on lucene. This is also available in eclipse marketplace.
It has extensive feature set.