Eclipse RCP - 如何重建项目的索引?
Eclipse RCP - How to rebuild project's index?
我正在开发一个创建 C 项目的 Eclipse 插件。
如何以编程方式执行以下操作:
右键单击项目 -> Index -> rebuild
谢谢!
在我的eclipse中,项目的上下文菜单中没有"Index"。
你知道间谍插件吗?您可以获得有关活动视图的信息,也许您可以找到适合您的相关信息。
阅读更多关于http://www.vogella.com/tutorials/EclipseCodeAccess/article.html#pluginspy
我假设您正在为 Eclipse CDT 开发插件。
没有更多的上下文,我无法给你一个完整的答案。然而,Eclipse CDT 项目的索引可以重建如下:
CCorePlugin.getIndexManager().reindex(project); // reindex
// note: project is an ICProject
CCorePlugin.getIndexManager().joinIndexer(IIndexManager.FOREVER, pm); // wait for the indexing job to complete.
为了访问 class CCorePlugin
你需要添加一个依赖包 org.eclipse.cdt.core
到你插件的 MANIFEST.MF。
我正在开发一个创建 C 项目的 Eclipse 插件。
如何以编程方式执行以下操作:
右键单击项目 -> Index -> rebuild
谢谢!
在我的eclipse中,项目的上下文菜单中没有"Index"。 你知道间谍插件吗?您可以获得有关活动视图的信息,也许您可以找到适合您的相关信息。
阅读更多关于http://www.vogella.com/tutorials/EclipseCodeAccess/article.html#pluginspy
我假设您正在为 Eclipse CDT 开发插件。
没有更多的上下文,我无法给你一个完整的答案。然而,Eclipse CDT 项目的索引可以重建如下:
CCorePlugin.getIndexManager().reindex(project); // reindex
// note: project is an ICProject
CCorePlugin.getIndexManager().joinIndexer(IIndexManager.FOREVER, pm); // wait for the indexing job to complete.
为了访问 class CCorePlugin
你需要添加一个依赖包 org.eclipse.cdt.core
到你插件的 MANIFEST.MF。