{{ !articles[0].partner.isSponsoringArticle ? "Platinum" : "Portal" }} Partner
java,eclipse rcp,netbeans platform

NetBeans vs. Eclipse RCP: Plugin Mechanism Comparison

NetBeans and Eclipse approaches extension points and extensions differently. Let us see what these differences are.

Please note, that this article is meant for those who already have suitable knowledge on both platform's plugin mechanisms.

NetBeans Platform:

Defining an Extension Point

Create an interface, and put it into a module-public package.

Creating an Extension

Create an implementation for the interface, and register it in the virtual file system of the layer.xml file.

Reading available Extensions

Use the org.openide.util.Lookup class to obtain instances of the interface implementations.

Eclipse RCP:

Defining an Extension Point

Create an extension point descriptor schema, that defines extension point elements and their attributes, as well as the relationship of these elements.

The following attribute types are available: boolean, string, java, resource, identifier.

Documentation can be added to any part of the schema.

Finally, register your extension point in the plugin.xml file.

Creating an Extension

In the plugin.xml file create a section according to the schema, where the attributes get their values.

If attribute type is java, create the referenced java class as well.

Reading available Extensions

Use the org.eclipse.core.runtime.IExtensionPoint to get the list of extensions. From each extension obtain the list of IConfigurationElements: each IConfigurationElement corresponds to an XML tag in the plugin.xml file.


NetBeans Platform

Eclipse RCP





Very simple, easy to learn.

The extension point does not define itself: there is no information about which module-public interface is used as an extension point.

The extension point clearly defines itself: a quick look into the jar file and you immediately know what extension points the plugin provides and what elements are they consist of.

More complex, more time to learn.


The lookup name to be used is also undefined.

Many attribute types: possible to describe certain structures in XML.



The extension and other content are mixed in the layer.xml file: hard to determine what extension points the module contribute to.

Possible to generate most part of the extension: see PDE




Well defined place for documentation.


{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks