Rational Developer for System z


Lesson 1: Create the BrowseMemberAction class

In this lesson, you will create the Java class responsible for handling the actions associated with browsing a CARMA member.
Note: Before you complete this lesson you should create an Eclipse plug-in project with the following attributes:
  • Project Name : com.ibm.carma.plugin.browse
  • ID : com.ibm.carma.plugin.browse
  • Name : Browse Menu

To create the BrowseMemberAction Java class:

  1. First, you want to set up the dependencies associated with this plug-in project. In the Package Explorer view, right click on com.ibm.carma.plugin.browse, your plug-in project, and select PDE Tools > Open Manifest.
  2. In the Plug-in Editor that opens, select Dependencies tab from the bottom menu of options.
  3. In the left panel, check to see if the following dependencies are listed:
    • org.eclipse.ui.ide
    • org.eclipse.core.resources
    • com.ibm.carma.core
    • com.ibm.carma.ui
    If these dependencies are not listed, then click Add button, filter for each, and add them.
  4. Save your changes.
  5. Now, you will create the BrowseMemberAction class. In the Package Explorer view, right click on your plug-in project and select New > Package.
  6. In the New Java Package dialog box that opens, enter in browse as the package name. Expand com.ibm.carma.plugin.browse > src, and you should see the package listed.
  7. Right click on the browse package you just created, and select New > Class. The New Java Class dialog box will open.
  8. In the Name text field, enter BrowseMemberAction.
  9. To the right of the Interfaces panel, select the Add button. The Implemented Interfaces Selection dialog box opens.
  10. In the text field, enter in IViewActionDelegate to filter for the appropriate interface. Select it when it appears in the Matching items panel below the text field, and click OK.
  11. Click Finish to close the New Java Class dialog box and create the Java class, which will open in the editor.

Terms of use | Feedback



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