Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List eclipse installed plugins at runtime

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?

like image 855
Bryji Avatar asked Jun 04 '09 10:06

Bryji


People also ask

How do I see what plugins are installed in Eclipse?

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.

Where are Eclipse Marketplace plugins installed?

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.

Where is Plugin XML in Eclipse?

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.

Where is the Eclipse plugin directory in Windows?

You can find the installation folder in About Eclipse > Installation Details > Configurations.

How do I Find my installed plug-ins in Eclipse?

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.

What are Eclipse plug-ins?

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.

How do I know if eclipse is installed or not?

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.

What is the Eclipse runtime?

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:


2 Answers

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.

http://t-templier.developpez.com/tutoriel/java/osgi/osgi1/images/architecture-osgi-haut-niveau.png

The interactions between the bundles are done through two complementary mechanisms: the package export/import and the service registration lookup facility.

http://sfelix.gforge.inria.fr/osgi-security/images/osgi/osgi_interoperability.png

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.

like image 101
VonC Avatar answered Sep 22 '22 12:09

VonC


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.

like image 45
Scott Stanchfield Avatar answered Sep 25 '22 12:09

Scott Stanchfield