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?
One way of finding out is to select Help > About Eclipse Platform >. From this dialog, click Plug-in Details to get a list of all installed plug-ins, along with vendor and version information.
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.
xml file is a kind of "deployment descriptor" for your new Eclipse plugin.) You can see the plugin. xml file's text by selecting the editor's plugin. xml tab.
You can find the installation folder in About Eclipse > Installation Details > Configurations.
From this dialog, click Plug-in Details to get a list of all installed plug-ins, along with vendor and version information. If you instead click Configuration Details, you will be rewarded with a full credit report of your current Eclipse installation.
The Eclipse platform is structured as a core runtime engine and a set of additional features that are installed as platform plug-ins. Plug-ins contribute functionality to the platform by contributing to pre-defined extension points. The workbench UI is contributed by one such plug-in.
One way of finding out is to select Help > About Eclipse Platform >. From this dialog, click Plug-in Details to get a list of all installed plug-ins, along with vendor and version information. If you instead click Configuration Details, you will be rewarded with a full credit report of your current Eclipse installation.
The Eclipse runtime defines a number of locations which give plug-in developers context for reading/storing data and Eclipse users a control over the scope of data sharing and visibility. Eclipse defines the following notions of location:
From here:
The BundleContext
class has a getBundles
() method that returns all installed bundles.
You get an instance of the BundleContext
when your bundle is activated BundleActivator.start(BundleContext))
.
You can use it to get some Bundle version number for instance.
The interactions between the bundles are done through two complementary mechanisms: the package export/import and the service registration lookup facility.
The publication and lookup of services are performed through the BundleContext
reference that each bundle receives at startup time.
During the publication process, the advertising bundles registers a service by publishing a Java interface it is implementing, and by providing a class implementing this interface.
The lookup is performed by the client bundle, which gets the service from the BundleContext
and uses it as a standard Java object.
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.
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