views:

306

answers:

1

I have some basic questions in eclipse plugin development, can anyone give clarification of the following questions,

When should we have to add features in our plugin development ?

What is the difference between feature and plugin.xml ?

Regards Mathan

+2  A: 

As mentioned in this thread:

  • A plugin is the eclipse "unit of work". An OSGi bundle that supplies a classpath and can contribute to eclipse through extensions.

  • A fragment points to a host plugin, and anything it provides (classpath, extensions, etc) are "sucked" into the host plugin. A fragment is also a more specialized OSGi bundle.

  • A feature represents a versioned collection of plugins, and is used for configuration management in eclipse. They can be deployed manually or through the update manager. If you want to deploy through the update manager, then you need to use features to represent your plugins.

So if you want to manage your plugin or plugins through the update manager, a feature is in order.

You can find more in the Eclipse Help:

Features do not contain any code.
They merely describe a set of plug-ins that provide the function for the feature and information about how to update it.
Features are packaged in a feature archive file and described using a feature manifest file, feature.xml.

While features are organized for the purposes of distributing and updating products, plug-ins are organized to facilitate the development of the product function among the product team. The development team determines when to carve up program function into a separate plug-in.
Plug-ins are packaged in a plug-in archive file and described using a plug-in manifest file, plugin.xml.

VonC