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:


  1. 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.
  2. To extend the plugin.xml file, select the Extensions tab from the list of tabs at the bottom.
  3. Click Add. In the New Extension dialog box that opens, enter org.eclipse.ui.decorators in the Extension Point filter text field.
  4. From the results that are found, select the one that matches the filter text exactly, and click Finish.
  5. 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.
  6. The following skeleton code is provided already:
    Between the open and close extension tags, place the following code:
    	label="Sample Decorator"
    		<objectClass name="com.ibm.carma.model.CARMAMember"/>
    		<ObjectClass name="com.ibm.carma.model.CARMAContainer"/>
    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 that are provided in this tutorial, then your package and class name should be the same as those given.
  7. Click save and resolve any errors.