Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

How do I access the index that eclipse uses to do Java search, import, etc?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
398 views
Welcome To Ask or Share your Answers For Others

1 Answer

This old thread (for eclipse2!) mentioned:

In the meantime if you feel like indexes are not complete (open type doesn't show you a type which it should), you can workaround by:

  • exiting Eclipse,
  • find the index files in the metadata, and discard them all.
  • Restart Eclipse,
  • and activate the open-type dialog which will trigger proper reindexing.

Index files are located in:
<workspace>/.metadata/.plugins/org.eclipse.jdt.core/, you want to get rid of all '*.index' files in the doubt + 'savedIndexNames.txt'.

I just checked with my current Eclipse Helios 3.6.1, and those files are still around.


More generally (and programmatically), the SearchParticipant API is involved with those files, ans mentioned in bug 308402

SearchParticipant has the method #selectIndexes and part of its documentation says "An index location represents a path in the file system to a file that holds index information." and to that effect we store our .index files in our own location and return those when the #selectIndexes method is called using the BasicSearchEngine.

You can see an example here.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...