Lesson 1: Create the BrowseMemberAction class

In this lesson, you create the Java™ class responsible for handling the actions that are associated with browsing a CARMA member.

About this task

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:

Procedure

  1. First, you want to set up the dependencies that are associated with this plug-in project. In the Package Explorer view, right click 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 seewhet 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 create the BrowseMemberAction class. In the Package Explorer view, right click 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 that is listed.
  7. Right click the browse package you created, and select New > Class. The New Java Class dialog box opens.
  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 opens in the editor.