When I search something in Eclipse, the search items stay highlighted for some time. How do I remove this after I have found what I was looking for?
Alt + Shift + O disables and enables this feature, which is called Mark Occurrences. There is also a toolbar button to toggle it on and off.
This is activated because of code coverage. If you want to remove it then follow these steps. Go to "Windows -> Show View -> Coverage" Select it.
Open Preferences, and navigate to General->Editors->Text Editors->Annotations. Select Occurrences, and change the color to whatever you like..
Under Window > Preferences > Java > Editor > Mark Occurrences the option is called "Keep marks when the selection changes" and disabling that yields the behavior you're looking for.
Remove your matches in the search view, that will remove the highlighting. I.e., click the button with the two X's in the search view.
If you cannot see that view, navigate to window -> show view -> Search
AFIAK, the search result view has a toolbar button to clear the search results. This removes the highlighting in the editor.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With