Eclipse插件无法在Ganymede中工作,但可以在Galileo中工作 [英] Eclipse plugin not working in Ganymede but working in Galileo

查看:77
本文介绍了Eclipse插件无法在Ganymede中工作,但可以在Galileo中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Eclipse Galileo中制作了一个插件.我的插件具有以下依赖性:

i made a plugin in eclipse Galileo. my plugin has folowing dependencies:

Require-Bundle: org.eclipse.ui;bundle-version="3.5.0",
 org.eclipse.core.runtime;bundle-version="3.5.0",
 org.eclipse.core.resources;bundle-version="3.5.0",
 org.eclipse.jdt.core;bundle-version="3.5.0",
 org.eclipse.jdt.ui;bundle-version="3.5.0"

但是由于Ganymede具有上述不同的版本,即:

but since Ganymede has different versions of the above namely :

Require-Bundle: org.eclipse.ui;bundle-version="3.4.2",
 org.eclipse.core.runtime;bundle-version="3.4.0",
 org.eclipse.core.resources;bundle-version="3.4.2",
 org.eclipse.jdt.core;bundle-version="3.4.2",
 org.eclipse.jdt.ui;bundle-version="3.4.2"

同一个插件在两者中均无法使用.我目前制作了两个插件,其中一个用于Galileo,一个用于Ganymede,具有manifest.mf中的上述差异

The same plugin does not work in both. I have made two plugins for the time being one for Galileo and one for Ganymede with the above difference in manifest.mf

是否有可能使插件与eclipse类型无关,因为将来制作新版本的eclipse时,我的插件将变得无用.即使所需的调整很小...是否有可能以某种方式使其独立

Is it possible to make a plugin independent of type of eclipse because in future when newer version of eclipse would be made my plugin will be rendered useless. even though the tweaking needed is low ... is it possible to somehow make it independent

我想到了将所需的插件包(例如org.eclipse.core.runtime; bundle-version ="3.5.0")与插件一起放置,并指示人们将其与我的插件jar一起粘贴到他们的插件目录中.是否有可能与已经存在的较低版本的插件包冲突?

I thought of putting the required plugins bundles (like org.eclipse.core.runtime;bundle-version="3.5.0") along with the plugin and instruct people to paste them along with my plugin jar in their plugin directory.is there a possibility that they might conflict with already existing lower version of plugins bundles?

推荐答案

之所以会出现此问题,是因为您的依赖项声明声明了要使用的 minimum 版本,因此在Ganymede上,未满足要求并且您的插件未加载.如果插件与Ganymede兼容,请指定依赖项版本,例如

The problem happens because your dependency declarations declare a minimum version to be used, so on Ganymede the requirements aren't met and your plugin is not loaded. If the plugin is compatible with Ganymede, specify the dependency versions as such, e.g.

org.eclipse.ui;bundle-version="3.4.2"

您将能够在两个平台(以及将来的版本)上使用该插件.我会使用这种方法.

And you'll be able to use the plugin on both platforms (and future versions too). I would use this approach.

请注意,如果您要包括特定范围的版本范围,则也可以将其设置为版本范围您支持的版本.例如:

Note, you can also set dependencies as version ranges if you want to include a specific range of versions you support. For example:

[3.0.0, 4.0.0)

将允许从3.0.0(含)到4.0.0(不含)的任何版本(即任何3.x版本)

Will allow any version from 3.0.0 inclusive to 4.0.0 exclusive (i.e. any 3.x version)

随着Eclipse 4的到来,这可能是您要考虑的问题.

As Eclipse 4 comes into the reckoning, this may be an issue for you to consider.

无论您做什么,都不要在您的发行版中包含3.5个插件,这将对Ganymede用户造成各种问题,因为其他插件可能无法正确使用

Whatever you do, don't include the 3.5 plugins in your distribution, it will cause all kinds of problems for Ganymede users as other plugins may not work correctly with them

这篇关于Eclipse插件无法在Ganymede中工作,但可以在Galileo中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆