Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to clear search history in Eclipse?

I am using Eclipse Ganymede 3.4.2. The search bar in both Search and Find/Replace is getting cluttered from previous searches. Is there a way to clear them?

I tried clearing the cache files in $workspace/.metadata/.plugins/org.eclipse.core.resources/.history/ but it does not help.

EDIT:
To clear File Search history, go to .metadata\.plugins\org.eclipse.search\dialog_settings.xml and under the TextSearchPage section, clear the history sections (e.g. <section name="HISTORY0"> ) and change HISTORY_SIZE value to 0.

To clear Java Search history, go to .metadata\.plugins\org.eclipse.jdt.ui\dialog_settings.xml and do the same thing under the JavaSearchPage section.

To clear Remote Search history, go to .metadata\.plugins\org.eclipse.rse.ui\dialog_settings.xml and do the same thing under the RemoteSearchPage section.

Still do not know how to clear the Find/Replace history.

like image 302
sadi Avatar asked Aug 17 '12 03:08

sadi


1 Answers

Please open file .metadata.plugins\org.eclipse.search\dialog_settings.xml in your workspce.

Search seaction TextSearchPage. Clear section history. In this tag, be careful of HISTORY_SIZE and section History

I mean if <item value="2" key="HISTORY_SIZE"/> <section name="HISTORY0"> and <section name="HISTORY1"> works.

Start eclipse.

For Find/Replace

.metadata\.plugins\org.eclipse.ui.workbench.texteditor\dialog_settings.xml

search for findhistory. You will see findHistory and replaceHistory.

like image 77
swemon Avatar answered Oct 03 '22 23:10

swemon