Mawg
Mawg

Reputation: 40150

Search Eclipse local history

Does Eclipse provide (possibly via a plug-in) the ability to search the local history?

E.g, I have a lot of history files and don't want to have to trawl through them all because I know that the version I want is the most recent which contains the string "slithy toves".


[Update] people answering similar questions on this site have not read the question – or it was badly phrased.

I am not looking to go to the local history (which do know how to find) and manually search through every entry, version by version. I want a single search function which will do that for me.


[Update++] the referenced question does not contain an acceptable answer. The only solution offered there involves creating a dummy project, which is more overehad than I care for.


Note: if it helps anyone, I found that the local history can be found in

Workspace\.metadata\.plugins\org.eclipse.core.resources\.history\

from which, I can use any file search tool of my choice

Upvotes: 3

Views: 954

Answers (2)

manuelvigarcia
manuelvigarcia

Reputation: 2094

Manualy search the local history

My answer to the question is "No, you cannot do that search from within Eclipse".

Nevertheless, in this answer to another question you can see the (linux) command line (and the explanation of what it does) to search the local history structure if you know specific code that was in the file you seek (like you indicated "slithy toves"):

fgrep -r -c "[slithy toves]" * | grep -v ":0" | cut -d : -f 1 | xargs ls -l

Upvotes: 1

Mawg
Mawg

Reputation: 40150

I found that the local history can be found in

Workspace\.metadata\.plugins\org.eclipse.core.resources\.history\

from which, I can use any file search tool of my choice.

However, filenames all look like 001ad08cc7790016142da217e60cb1a5, so I can't search for widget.c :-(

There is also no index, since I searched for files containing 001ad08cc7790016142da217e60cb1a5, hoping to find maybe some XML which told me the original file name, with a reference to 001ad08cc7790016142da217e60cb1a5, but I found nothing :-(

Also, some of the saved files seem to be binary, and I can't see how to configure Eclipse to save only *.c and *.h

Upvotes: 1

Related Questions