Lesson 5: Modify the plugin.xml
file
In this lesson, you modify the plugin.xml
file
to provide the org.eclipse.ui.decorators
extension
point and attributes.
About this task
To modify the plugin.xml
file:
Procedure
- In the Package Explorer view, right-click
on the
CARMA Decorators
plug-in project, and select PDE Tools > Open manifest. The Plug-in Editor opens. - 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 might 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:
Between the open and close extension tags, place the following code:<plugin> <extension point="org.eclipse.ui.decorators"> </extension> </plugin>
<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 theclass
attribute tells the plug-in what class to use and where it is located. This location should correspond with thepkg_you_created.class_name
. If you followed the names that are provided in this tutorial, then your package and class name should be the same as those given. - Click save and resolve any errors.