How to cancel search highlight in Eclipse

Eclipse

Eclipse Problem Overview


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?

Eclipse Solutions


Solution 1 - Eclipse

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

Solution 2 - Eclipse

AFIAK, the search result view has a toolbar button to clear the search results. This removes the highlighting in the editor.

Solution 3 - Eclipse

An alternative way is to run a search that will yield no results. For example file search, containing text - leave this field empty, files - some stupid extension like ".qwe".

For people concerned that https://stackoverflow.com/a/3545215/6012102 removes search results from history.

Select the search from history, press "Run the current search again" (2 rotating arrows icon). This will run the search and you will get all the results back (this brings back the text highlight as well unfortunately).

Solution 4 - Eclipse

Disable Preferences->General->Text Editors->Annotations->Search Results->Text as.

Solution 5 - Eclipse

For a single instance, delete the line and undo it: Ctrl+DCtrl+Z. This is faster than the other answers, and worked when they failed (for some buggy JSP I had).

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionfastcodejavaView Question on Stackoverflow
Solution 1 - EclipseK ErlandssonView Answer on Stackoverflow
Solution 2 - EclipseAndreas DolkView Answer on Stackoverflow
Solution 3 - Eclipseandrzej.szmukalaView Answer on Stackoverflow
Solution 4 - EclipseAAAView Answer on Stackoverflow
Solution 5 - EclipseNoumenonView Answer on Stackoverflow