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:
- 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.
- In the Plug-in Editor that opens,
select Dependencies tab from the bottom menu
of options.
- 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.
- Save your changes.
- Now, you will create the BrowseMemberAction class.
In the Package Explorer view, right click on
your plug-in project and select New > Package.
- 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.
- Right click on the browse package you
just created, and select New > Class.
The New Java Class dialog box will open.
- In the Name text field, enter BrowseMemberAction.
- To the right of the Interfaces panel,
select the Add button. The Implemented
Interfaces Selection dialog box opens.
- 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.
- Click Finish to close the New
Java Class dialog box and create the Java class, which will open in the editor.