views:

131

answers:

2

Is it possible (via a plugin or other way) for Eclipse to build a full text index for a project, so that searching a String does not linearly search all the files in the project?

(or does it automatically build such an index to speed up future searches?)

+1  A: 

The index files used by the search component of Eclipse (like a SearchParticipant) are in your workspace:

.metadata\.plugins\org.eclipse.jdt.core

As mentioned in this thread,

These files are used by the search or some other tools in Eclipse.
If you remove them, they will created again when you restart Eclipse or when you will activate the indexes. Then you will see a progress bar saying the number of files that need to be indexed.

alt text

VonC
A: 

You can write a plugin that does that. Using the "Builder" example in Eclipse PDE in conjunction with Lucene, it should take a novice a couple of days to get something that works.

If you are interested, nWire (for Java or PHP) offers a full text search for all the elements in your code (not just types, but also methods, fields, constants, etc.). It does not index all the code, though.

zvikico