In this lesson, you will modify the plugin.xml file
to provide the org.eclipse.ui.decorators extension
point and attributes.
To modify the plugin.xml file:
- In the Package Explorer view, right
click on the CARMA Decorators plug-in project, and
select PDE Tools > Open manifest.
The Plug-in Editor will open.
- To extend the plugin.xml file, select
the Extensions tab from the list of tabs at
the bottom.
- Click Add. In the New
Extension dialog box that opens, enter org.eclipse.ui.decorators in
the Extension Point filter text field.
- From the results that are found, select the one that matches
the filter text exactly, and click Finish.
- The Plug-in Editor should still
be open. At the bottom, select the plugin.xml tab
from the bottom menu of items. You may have to select the >> button
to make this option visible. The plugin.xml file
should open in the Plug-in Editor.
- The following skeleton code is provided already:
<plugin>
<extension
point="org.eclipse.ui.decorators">
</extension>
</plugin>
Between the open and close extension tags,
place the following code:<description
adaptable="true"
class="decorator.Decorator"
id="com.ibm.carma.ui.ftt.sample"
label="Sample Decorator"
lightweight="true"
location="BOTTOM_RIGHT"
state="true">
</description>
<enablement>
<or>
<objectClass name="com.ibm.carma.model.CARMAMember"/>
<ObjectClass name="com.ibm.carma.model.CARMAContainer"/>
</or>
</enablement>
Note: The information that
follows the class attribute tells the plug-in what
class to use and where it is located. This location should correspond
with the pkg_you_created.class_name. If you followed
the names provided in this tutorial, then your package and class name
should be the same as those given.
- Click save and resolve any errors.