如何找出哪个功能在Eclipse下载站点上包含所需的插件 [英] How to find out which feature contains a needed plug-in on an Eclipse download site

查看:166
本文介绍了如何找出哪个功能在Eclipse下载站点上包含所需的插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在针对目标平台开发RCP应用程序时,我(和其他经常遇到需要从Eclipse版本软件站点添加的依赖关系。无论何时插件都包含在我的IDE中,但不包含在我的目标平台中,而且我尝试从产品定义中运行应用程序,我会收到一个警告屏幕,通知我这样的捆绑包无法解决。



没有问题,只需将包含插件的功能从Eclipse下载站点添加到目标平台,并将所需的插件添加到插件项目/功能项目,whathaveyou ....



但是,AFAIK没有简单的方法(例如网站)来找出哪个功能包含哪些插件。例如,为了添加 org.eclipse.ui.views.properties.tabbed ,我需要知道这个插件被包含在 Eclipse Platform SDK 功能(等等)。



到目前为止,我还没有找到一个简单的方法来找出哪个功能包含哪个插入。我通常首先使用谷歌搜索插件名称,并尝试在搜索结果中找到一个教程或类似的内容,这可能告诉我要包括哪些功能以便访问插件。当然,这可以是乏味的。



所以我的问题是:有更好的,甚至是官方(或恶意)的方式来快速简单地找到这些信息? / p>

解决方案

如果您启动p2控制台,您可以使用p2查询语言查找依赖于一个bundle的所有功能。我的例子是Eclipse Juno(4.2):


  1. 在控制台视图中切换到OSGi控制台

  2. ss p2.console#找到控制台捆绑编号

  3. felix:start -t consoleBundleNumber

现在您可以发出p2查询。要查找当前安装中的哪些功能包含 org.eclipse.jface ,您可以使用:

  OSGi的> provlpquery这个select(parent | parent.properties ['org.eclipse.equinox.p2.type.group'] == true&& parent.requirements.exists(rc | everything.exists(iu | iu.id = ='org.eclipse.jface'&& iu〜= rc)))true 
org.eclipse.e4.rcp.feature.group 1.1.0.v20120521-2329-8yFTIGF3GGduEYqkQB9M3DKn
org .eclipse.e4.tools.css.spy.feature.feature.group 0.12.0.v20111206-1509-17B-7w3123161302752

要找出哪些功能包括 org.eclipse.ui.views.properties.tabbed ,您可以使用:

 的OSGi> provlquery http://download.eclipse.org/releases/junoselect(parent | parent.properties ['org.eclipse.equinox.p2.type.group'] == true&& parent.requirements.exists( rc | everything.exists(iu | iu.id =='org.eclipse.ui.views.properties.tabbed'&& iu〜= rc)))true 
org.eclipse.amp.amf .feature.group 0.9.0.v20120528-0244
org.eclipse.bpel.feature.feature.group 1.0.1.v20120606-0845-CI
org.eclipse.jwt.feature.feature.group 1.2.0.v201205310546-7O7i-FK_Qj4QkVn3kW9q
org.eclipse.platform.feature.group 4.2.0.v20120528-1648-9JF7BHV8FyMteji0MoOeOuU6sAnxIeYtKNM1dK
org.eclipse.ptp.etfw.tau.feature.group 6.0。 0.201206052145
org.eclipse.tcf.te.feature.feature.group 1.0.0.201206051725
org.eclipse.tcf.te.tcf.feature.feature.group 1.0.0.201206051725

在这种情况下, org.eclipse.platform.feature.group 是最正确的一个。 p>

第一个例子是在运行的eclipse中查询配置文件,所以它使用 provlpquery这个。第二个例子是指定一个外部p2仓库,因此它使用 provlquery repo



请参阅 http://wiki.eclipse.org/Equinox_p2_Console_Users_Guide 。有很多黑魔法: - )


When developing an RCP application against a target platform, I (and others) often come across dependencies which need to be added from the Eclipse releases software site. Whenever a plug-in is included in my IDE, but not in my target platform, and I try to run the application from the product definition I get a warning screen, informing me that such and such bundle cannot be resolved.

"No problem, just add the feature containing the plug-in from the Eclipse download site to the target platform, and add the needed plug-in to the Plug-in Project / Feature Project, whathaveyou...."

But, AFAIK, there is no simple way (e.g., website) to find out which feature includes which plug-in. E.g., in order to add org.eclipse.ui.views.properties.tabbed, I would need to know that this plug-in is included in the Eclipse Platform SDK feature (amongst others).

Up to now I haven't found an easy way to find out which feature contains which plug-in. I usually start out with googling the plug-in name, and try to find a tutorial or similar among the search results, which might tell me which feature to include in order to get to the plug-in. This can be tedious, of course.

So my question is: Is there a better, perhaps even official (or officious) way to find this information quick and simple?

解决方案

If you fire up the p2 console, you can use the p2 query language to find all features that depend on a bundle. My example is in Eclipse Juno (4.2):

  1. switch to the OSGi console in the console view
  2. ss p2.console # to find the console bundle number
  3. felix:start -t consoleBundleNumber

Now you can issue p2 queries. To find which features in your current install contain org.eclipse.jface, you can use:

osgi> provlpquery this "select(parent | parent.properties['org.eclipse.equinox.p2.type.group'] == true && parent.requirements.exists(rc | everything.exists(iu | iu.id == 'org.eclipse.jface' && iu ~= rc)))" true
org.eclipse.e4.rcp.feature.group 1.1.0.v20120521-2329-8yFTIGF3GGduEYqkQB9M3DKn
org.eclipse.e4.tools.css.spy.feature.feature.group 0.12.0.v20111206-1509-17B-7w3123161302752

To find out which feature includes org.eclipse.ui.views.properties.tabbed you can use:

osgi> provlquery http://download.eclipse.org/releases/juno "select(parent | parent.properties['org.eclipse.equinox.p2.type.group'] == true && parent.requirements.exists(rc | everything.exists(iu | iu.id == 'org.eclipse.ui.views.properties.tabbed' && iu ~= rc)))" true
org.eclipse.amp.amf.feature.group 0.9.0.v20120528-0244
org.eclipse.bpel.feature.feature.group 1.0.1.v20120606-0845-CI
org.eclipse.jwt.feature.feature.group 1.2.0.v201205310546-7O7i-FK_Qj4QkVn3kW9q
org.eclipse.platform.feature.group 4.2.0.v20120528-1648-9JF7BHV8FyMteji0MoOeOuU6sAnxIeYtKNM1dK
org.eclipse.ptp.etfw.tau.feature.group 6.0.0.201206052145
org.eclipse.tcf.te.feature.feature.group 1.0.0.201206051725
org.eclipse.tcf.te.tcf.feature.feature.group 1.0.0.201206051725

In this case, org.eclipse.platform.feature.group is the most correct one.

The first example is querying profiles in the running eclipse, so it uses provlpquery this. The second example is specifying an external p2 repository, so it uses provlquery repo.

See http://wiki.eclipse.org/Equinox_p2_Console_Users_Guide for more information on the p2 console. There's a lot of black magic going on :-)

这篇关于如何找出哪个功能在Eclipse下载站点上包含所需的插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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