Lesson 5: Modify the
In this lesson, you modify the
to provide the
point and attributes.
About this task
To modify the
- In the Package Explorer view, right-click
CARMA Decoratorsplug-in project, and select PDE Tools > Open manifest. The Plug-in Editor opens.
- To extend the
plugin.xmlfile, 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.xmlfile 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 the
classattribute 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 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.