Eclipse 插件不会从“已解决”变为“活动”
我创建了一个 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您需要将插件设置为自动启动,并且希望人们通过 p2 安装该插件,那么您需要添加一个
p2.inf
文件。该文件包含一些额外的安装说明。将以下 p2.inf 文件添加到插件的元数据目录中:
有关
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:
More information on the
p2.inf
file can be found here.我假设您尝试启动 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.