Rational Programming Patterns for System z

Creating a plug-in dedicated to user menus

A specific creation wizard is available to create this type of plug-in.

Procedure

  1. To open the creation wizard, select File > New > Project > Plug-in Project.
  2. The following two pages are standard pages used for the creation of Eclipse projects.
    Note: On the Content page, in the Options pane, you must check 'This plug-in will make contributions to the UI'. Moreover, if you must perform specific actions upon the plug-in loading, you can also select 'Generate an activator'.
  3. On the Templates page, select 'Create a plug-in using one of the templates' and 'RPPz Design Explorer menu wizard'. Click Next.
  4. On the plug-in creation page, enter the:
    • Name of the Java™ class in which you will describe your menu.
    • Identifier of the extension point.
    • Entity types on which the menu is to be displayed. Enter them as pacprogram, pacscreen, pacsegment... Separate them with commas.
    • Menu name.

Results

The plug-in in which you can describe your menu has been created in Eclipse. You can see it in the Package Explorer view of the Plug-in development perspective.
The plugin.xml file contains the user menu extension point.
Figure 1. Menu extension point
      <extension 
       point="com.ibm.pdp.maf.rpp.mafDesignExplorerMenuActionContributor">
     <mafDesignExplorerMenuActionContributor
            class="com.ibm.rpp.sample.menu.SimpleDesignExplorerMenu"
            id="menuId">
            entityTypes="pacprogram,pacmacro,dataelement"
      </mafDesignExplorerMenuActionContributor>
       </extension>

To describe your menu, open the plug-in and the Java class generated from the name you specified in the creation wizard.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)