简体   繁体   English

您将如何访问Eclipse JDT索引?

[英]How would you access Eclipse JDT index?

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

This old thread (for eclipse2!) mentioned: 这个旧线程(用于eclipse2!)提到:

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: 同时,如果您觉得索引不完整( open type没有显示应有的类型),则可以通过以下方法解决:

  • exiting Eclipse, 退出Eclipse,
  • find the index files in the metadata, and discard them all. 在元数据中找到索引文件,然后将其全部丢弃。
  • Restart Eclipse, 重新启动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 '. <workspace>/.metadata/.plugins/org.eclipse.jdt.core/ ,您想摆脱所有+的“ *.index ”文件和“ savedIndexNames.txt ”。

I just checked with my current Eclipse Helios 3.6.1, and those files are still around. 我刚刚检查了当前的Eclipse Helios 3.6.1,这些文件仍然存在。


More generally (and programmatically), the SearchParticipant API is involved with those files, ans mentioned in bug 308402 更一般地(以编程方式),这些文件涉及SearchParticipant API错误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." SearchParticipant具有方法#selectIndexes ,其文档的一部分说:“索引位置代表文件系统中包含索引信息的文件的路径。” 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 . 并为此目的,我们保存我们.index文件在我们自己的位置,并返回那些当#selectIndexes方法是使用所谓的BasicSearchEngine

You can see an example here . 您可以在此处查看示例

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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