简体   繁体   中英

How would you access Eclipse JDT index?

如何访问eclipse用于Java搜索,导入等的索引?

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM