使用 virgo 中的 eclipse 扩展点

发布于 2024-12-14 07:56:47 字数 461 浏览 2 评论 0原文

我在这里遇到了一个问题...我们的团队正在尝试将 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

怀中猫帐中妖 2024-12-21 07:56:47

第一步是将 eclipse 注册表包添加到用户区域的初始工件中;在 org.eclipse.virgo.kernel.userregion.properties 中,将initialArtifacts 更改为:

initialArtifacts=repository:plan/org.eclipse.virgo.kernel.userregion.blueprint,repository:plan
/org.eclipse.virgo.web.tomcat,repository:configuration/org.eclipse.virgo.apps.repository,repository:plan/org.eclipse.virgo.management,repository:bundle/org.eclipse.equinox.registry

这至少可以确保在加载 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:

initialArtifacts=repository:plan/org.eclipse.virgo.kernel.userregion.blueprint,repository:plan
/org.eclipse.virgo.web.tomcat,repository:configuration/org.eclipse.virgo.apps.repository,repository:plan/org.eclipse.virgo.management,repository:bundle/org.eclipse.equinox.registry

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文