sadi
sadi

Reputation: 93

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.

Upvotes: 7

Views: 8265

Answers (2)

CodeMatrix
CodeMatrix

Reputation: 11

Just delete your .metadata file and it works all of your history is gone!

Upvotes: -2

swemon
swemon

Reputation: 5946

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.

Upvotes: 7

Related Questions