Reputation: 61
There are several ways to formulate bundle dependencies in Eclipse. My question is: "what is it all about?", "Why does Eclipse use two different files (plugin.xml, manifest.mf)?", "Does equinox also handle the Eclipse Extension mechanism or will it just handle OSGi related information?". As far as I understand, did eclipse offer the extension mechanism before they shifted to Equinox. The idea behind the extension mechanism has been that developers can define precise interfaces which enhances their Eclipse RCP with additional features in the future. This information is stored in a xml-document the "plugin.xml" specifying provided extension-points and implemented extensions.
Equinox, on the other hand, provides fully functional services which are implemented right now and can be used by plugins (like libraries). Meaning the functionalities already exist and can be used by bundles in terms of services. OSGi related information is located in the MANIFEST.MF by adding these optional information. An application which does not use of OSGi will not regard this information but will be fully functional since the information is optional.
Please let me know if I am wrong.
Upvotes: 1
Views: 598
Reputation: 20985
Before Eclipse 3.0, the Eclipse runtime had its own module concept and implementation. The plugin.xml was used to declare extensions as well as to declare dependencies to other plug-ins.
With Eclipse 3.0 the project maintainers decided to use OSGi to modularize Eclipse and Equinox was born. It implemented the OSGi specification, which also was extended to provide for Eclipse specificities inherited from previous versions.
Since then, every plug-in is also an OSGi bundle, but not necessarily vice versa. In general, every plug-in and bundle can also be used as a plain library, ignoring the metadata that is included in the jar. However, at runtime, often plug-ins/bundles aren't useful as they depend on the infrastructure provided by Equinox/OSGi .
Thus nowadays, the plugin.xml file only holds extensions and extension points, and the MANFIEST.MF file is read by the OSGi runtime to obtain - among other declarations - dependency information.
The Equinox project provides two things:
Services are also part of the OSGi specification. Technically, services as well extensions could be used as entry points into features of the platform/other plug-ins. However, for historical reasons, I assume, most entry points are provided in the form of extension points.
One goal of the extension point design was to manage a large amount of extensions without slowing down Eclipse's performance at startup and at runtime. For this reason, extension points and extensions are read without activating the OSGi bundle of the plug-in which provides them. Activation happens as late as possible: when code provided by an extension needs to be invoked.
Does that answer your questions/confirm your assumptions?
Upvotes: 4