Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 363544

Summary: Given a plugin id or package name, find the feature that provides it in the repository
Product: [Eclipse Project] Equinox Reporter: Corey Ashford <cjashfor>
Component: p2Assignee: P2 Inbox <equinox.p2-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: nalinig, thomas, tjwatson
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Corey Ashford CLA 2011-11-10 19:53:18 EST
Build Identifier: M20110909-1335

When developing in Eclipse, I often find that I don't have some plugin I need to compile my code.  Sometimes it is a trivial process to figure out which feature I need to install to get that plugin or package, but other times, it can take quite awhile.

I would like a tool that would: given a plugin or Java package name, provide the name or names of features which provide that plugin/package.

This may sound unrelated, but in principle it's the same as the "yum whatprovides <some_file_or_library>" in Redhat Linux.  That command is not need really often, but when you need it, it often saves an enormous amount of time.


Reproducible: Always
Comment 1 DJ Houghton CLA 2011-11-11 10:57:02 EST
If you have a class, then you can look up the bundle via:
   ((BundleReference)clazz.getClassLoader).getBundle()
   PackageAdmin.getBundle(Class)

But it sounds like you want to look something up against a repository rather than in your running instance.

This can most likely be done using the query language. Information can be found here:
   http://wiki.eclipse.org/Query_Language_for_p2
Also I'll add Thomas to the CC as he might be able to help with constructing a query. 

But I can't see us creating API to do this, so I'll close this report.
Comment 2 Corey Ashford CLA 2011-11-11 13:32:12 EST
I don't need an API.  I want a UI feature that I can use to figure out which feature I need to install from a repository.