I’m a little confused on the approach to extensions/services in the Eclipse architecture. There are two options available to a developer:
- The use of Eclipse plugin extensions – http://www.eclipse.org/articles/Article-Plug-in-architecture/plugin_architecture.html
- The use of declarative services – http://www.eclipse.org/equinox/bundles/
When you would use one over the other and what are the advantages and the disadvantages of each approach? Also going forward which is the preferred approach?
There’s a pretty good comparison (from 2007, I think) on EclipseZone: A Comparison of Eclipse Extensions and OSGi Services.
I would follow the conventions of your target platform. So, if you’re writing a plugin for Eclipse 3.4, say, create an Eclipse 3.4 plugin (which will use a MANIFEST.MF for dependencies and a plugin.xml for extensions/extension points – the article you link to is for Eclipse 2.x). You can examine the contents of the plugins directory to confirm this.