使用 virgo 中的 eclipse 扩展点
我在这里遇到了一个问题...我们的团队正在尝试将 Eclipse Eclipse RCP 项目移植到网络中,因此第一步是尝试使用 Virgo 来使用插件。我已经创建了所有正确的东西,但是当我尝试使用扩展点(Eclipse 概念)时,它在调用时给出了一个空指针异常:
org.eclipse.core.runtime.Platform.getextensionregistry(); // null 这里
有人有解决这个问题的经验吗?
谢谢,
汤姆
更新:
所以我对此有了进一步的了解。我已将 org.eclipse...registry 捆绑包及其关联捆绑包添加到存储库/usr 文件夹中,并且在启动 Web 应用程序后必须手动登录控制台才能启动它。但这仍然是一个问题,因为现在我的应用程序似乎没有注册任何扩展点。可能是应用程序启动的顺序? (即,我必须先启动注册表捆绑包)?
I am encountering a problem here...our team is trying to port an eclipse Eclipse RCP project into the web and so the first step is to try to use Virgo to use the plugins. I have created all the correct things but when I try to use an extension point (an Eclipse concept) it gives me a null pointer exception on this call:
org.eclipse.core.runtime.Platform.getextensionregistry(); // null here
Does anyone have any experience when it comes to solving this problem?
Thanks,
Tom
UPDATE:
So I got a little further with this. I've added the org.eclipse...registry bundle along with its associated bundles to the repository/usr folder and had to manually login to the console to start it up after I start up my web app. However this is still a problem because now my app doesn't seem to have any of the extension points registered. Could it be the sequence in which the app is started? (ie. I have to start the registry bundle first)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
第一步是将 eclipse 注册表包添加到用户区域的初始工件中;在 org.eclipse.virgo.kernel.userregion.properties 中,将initialArtifacts 更改为:
这至少可以确保在加载 eclipse 插件时注册表插件可用。
我仍在努力解决如何控制注册表加载哪些plugin.xml 以及什么触发它。不知何故,一些 Eclipse 运行时会扫描一些插件目录,但我仍然不清楚如何在 Virgo 中进行设置。
A first step would be to add the eclipse registry bundle to the initial artifacts for the user region; in org.eclipse.virgo.kernel.userregion.properties, change initialArtifacts to:
This will at least ensure that the registry plugin is available while your eclipse plug-ins are being loaded.
What I am still struggling with is figuring out how to control which plugin.xml are loaded by the registry and what triggers that. Somehow some eclipse runtime will scan some plugins directory, but how to set that up while in Virgo is still unclear to me.