Products extension point
The preferred mechanism for defining a product based on the Eclipse platform
is to contribute to the
org.eclipse.core.runtime.products
extension point. To do this, a plug-in simply declares the name and id of its
product,
as
well as the id of the application extension that should be run when the product
is
invoked. This is the technique used by the Eclipse
platform itself in defining the Eclipse product. Here is the extension definition
found in org.eclipse.platform:
<extension id="ide" point="org.eclipse.core.runtime.products">
<product name="%productName" application="org.eclipse.ui.ide.workbench" description="%productBlurb">
<property name="windowImages" value="eclipse.png,eclipse32.png"/>
<property name="aboutImage" value="eclipse_lg.png"/>
<property name="aboutText" value="%productBlurb"/>
<property name="appName" value="Eclipse"/>
<property name="preferenceCustomization" value="plugin_customization.ini"/>
</product>
</extension>
A product extension is defined whose
application id is "org.eclipse.ui.ide.workbench".
This is the application id defined by the plug-in
org.eclipse.ui.ide in
its
contribution to the
org.eclipse.core.runtime.applications
extension point.
<extension
id="workbench"
point="org.eclipse.core.runtime.applications">
<application>
<run
class="org.eclipse.ui.internal.ide.IDEApplication">
</run>
</application>
</extension>
This extension is defined with the same id that is referenced in the application property
of the product extension. (The fully qualified name, with plug-in prefix, is
used when referring to the
application id from the other plug-in.) Using this mechanism, a separate plug-in
can define all of the product-specific branding, and then refer to an existing
plug-in's application as the application that
is actually run when the product is started.
In addition to the application, the
org.eclipse.core.runtime.products
extension describes product customization properties that are used to configure the product's branding information.
This information is described as named properties. Let's look again at that portion of the markup for the
platform plug-in.
<property name="windowImages" value="eclipse.png,eclipse32.png"/>
<property name="aboutImage" value="eclipse_lg.png"/>
<property name="aboutText" value="%productBlurb"/>
<property name="appName" value="Eclipse"/>
<property name="preferenceCustomization" value="plugin_customization.ini"/>
The possible property names that are honored by the platform for product customization are defined in
IProductConstants
.
See the javadoc for a complete description of these properties and their values. We'll look at these
further in
Customizing a product.