Eclipse 插件不会从“已解决”变为“活动”

发布于 2024-10-06 01:56:51 字数 804 浏览 1 评论 0原文

我创建了一个 Eclipse 插件捆绑包,它不会从“已解决”状态变为“活动”状态。

我尝试打开 OSGI 控制台来查看捆绑包无法启动的原因,但似乎没有任何问题。如果我输入“start bundleid”,那么它就会按照您的预期启动。

该捆绑包使用 'org.eclipse.ui.startup' 扩展点,我用它在 Eclipse 工作区启动期间执行任务。

这是使用中的清单:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: My Bundle
Bundle-SymbolicName: com.joejag.bundle;singleton:=true
Bundle-Version: 1.1.0.qualifier
Bundle-Activator: com.joejag.bundle.Activator
Require-Bundle: org.eclipse.ui,
 org.eclipse.core.runtime,
 org.eclipse.core.resources
Bundle-Vendor: Joejag
Bundle-RequiredExecutionEnvironment: J2SE-1.5

该捆绑包旨在供其他人使用。因此,要求他们启动 OSGI 控制台并手动启动捆绑包并不是一个可行的解决方案。

这是我能获得的关于该主题的最近的帮助,但并不是很有帮助。请参阅 Wiki Eclipse

I have a Eclipse plugin Bundle I've created which won't go from the RESOLVED state to ACTIVE.

I've tried opening the OSGI console to see why the bundle won't start but there doesn't appear to be any problems. If I type "start bundleid" then it starts as you would expect.

The bundle is using the 'org.eclipse.ui.startup' extension point which I'm using to perform a task during the Eclipse workspace startup.

This is the manifest in use:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: My Bundle
Bundle-SymbolicName: com.joejag.bundle;singleton:=true
Bundle-Version: 1.1.0.qualifier
Bundle-Activator: com.joejag.bundle.Activator
Require-Bundle: org.eclipse.ui,
 org.eclipse.core.runtime,
 org.eclipse.core.resources
Bundle-Vendor: Joejag
Bundle-RequiredExecutionEnvironment: J2SE-1.5

The bundle is intended to be used by others. So asking them to start up an OSGI console and manually start the bundle isn't a viable solution.

This is the nearest I could get to help on the subject which isn't very helpful.See Wiki Eclipse.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

半葬歌 2024-10-13 01:56:51

如果您需要将插件设置为自动启动,并且希望人们通过 p2 安装该插件,那么您需要添加一个 p2.inf 文件。该文件包含一些额外的安装说明。

将以下 p2.inf 文件添加到插件的元数据目录中:

instructions.configure = setStartLevel(startLevel:4);
markStarted(started: true);

有关 p2.inf 文件的更多信息,请访问 此处

If you need to set your plugin to autostarted and you are expecting that people will install the plugin through p2, then you need to add a p2.inf file. This file contains some extra install instructions.

Add the following p2.inf file to your metadata directory of your plugin:

instructions.configure = setStartLevel(startLevel:4);
markStarted(started: true);

More information on the p2.inf file can be found here.

╰ゝ天使的微笑 2024-10-13 01:56:51

我假设您尝试启动 Eclipse 应用程序!?如果是这种情况,请设置进入您的 Eclipse 应用程序启动配置并进入插件选项卡。将参数默认自动启动设置为true,然后重试。

I assume you try to start a Eclipse application!? If it the case, please set go into your Eclipse application launch configuration and there into the Plug-Ins tab. Set the parameter Default Auto-Start to true and try it again.

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