views:

1078

answers:

2

Here's something obvious that should be easy to do...

How do I retrieve a list of installed plugins at runtime? Can't see an obvious way to do this a Platform.getBundle() requires a specific plugin name.

Is this perhaps a restriction for some kind of security reason?

+3  A: 
VonC
Great thanks VonC, that's just what I needed. In the end I used the extension registry and found the plugins I was looking for through an extension they all had in common but this answer is the canonical one.Are you discussing services because this is how the bundles discover each others presence and hence enable discovery of installed plugins?
Bryan Solan
@Bryan: yes, the service part was there to give a bit of context (pun not intended) to the BundleContext usage.
VonC
A: 

If you're looking to write this in your code, see VonC's answer.

If you just want a view that does this, there's already one in eclipse: Window->Show View->Other...->PDE Runtime->Plugin Registry. This displays plugins, their extensions, dependencies, and who is providing extensions.

Scott Stanchfield