michael nesterenko
michael nesterenko

Reputation: 14439

eclipse search in history

It is possible to search in previous revisions of saved file? This is internal eclipse version system which is accessible on History view, not svn or anything like it.

Upvotes: 3

Views: 2318

Answers (3)

Peter Tarlos
Peter Tarlos

Reputation: 901

You can search the Eclipse local history on your file system using unix commands.

  • The Eclipse local history is stored in eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history
  • Files are randomly named (./53/c05661ce5d3d001a1f3eef73aaebdbfd), so you'll need to search for content.
  • The grep command below lists all files containing "WHATEVER", i.e. your latest changes.
  • The find command below does the same plus it shows the last updated timestamp, so you can pick out the file with the latest changes.
$ cd eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history
$ grep -r "WHATEVER"
- OR
$ find . -exec grep "WHATEVER" '{}' \; -ls 2>/dev/null

Upvotes: 0

dlauzon
dlauzon

Reputation: 11

You can create a new Project on the folder "(insert workspace root here)\.metadata\.plugins\org.eclipse.core.resources\.history" and do a file search on this project.

Don't forget to add a plain "*" to the "File name patterns" in the Search window, as the Eclipse history files have no file extension at all (so they would not be found by "*.*").

Upvotes: 1

Akram
Akram

Reputation: 9

right click the project in eclipse..then click history and maximize history by double clicking on it.. then check for a button's icon like multiple arrows click it and search with comments or author.

Upvotes: 0

Related Questions