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?
The m2e plugin or Maven Integration for Eclipse plugin is another popular Eclipse plugin you need for Java development. It provides comprehensive Maven integration for Eclipse.
Eclipse traditionally puts plugins in the Eclipse install location in a 'plugins' directory. If that location is not writeable then a . eclipse directory in the user's home directory is used. For newer Eclipse installs using the Oomph installer a .
The Plug-in Development Kit (PDK) includes an Eclipse plug-in that you can use in your Eclipse or Rational® Application Developer environment to create and edit some of the configuration files in the plug-ins that are used in your virtual applications. Overview.
You can easily run a plug-ins in another instance of Eclipse by selecting Run > Run As > Run-time Workbench. This will launch a new workbench on the same Java runtime as your development workbench, with all plug-ins in your current workspace enabled, and starting in a special runtime workspace.
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):
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 :-)
There is also a GUI utility that can answer this question, p2browser:
The utility is also useful for searching for plugins/bundles that provide specific Java package.
Although developing quite a few RCP applications, I've not came across a convenient solution for this problem. A good source of plug-ins is the Eclipse IDE itself. To find out the dependencies I find the Dependency Analysis feature in the Plug-in Manifest Editor quite helpful. Moreover one can validate a product configuration via the Validate... button in the to right corner of the Product Configuration Editor. If plug-ins are missing they are listed as a result.
One possiblity I've not tried so far is to define a target platform by specifying one or more software sites instead of relying on locally downloaded features and plug-ins.
Surely this is not the answer you were looking for but imho there's no real solution for this problem. There are just tools and vehicles (partly described above) which help to ease the pain when constructing the target platform of a RCP application.
Basic idea: Get definitions of all the features and then search through it.
More detailed description: http://divby0.blogspot.com/2010/10/howto-find-feature-that-contains-plugin.html
Doesn't look like an effective solution, but still it's something.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With