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
- 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.
- In the Plug-in Editor that opens,
select Dependencies tab from the bottom menu
of options.
- 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.
- Save your changes.
- Now, you create the
BrowseMemberAction
class.
In the Package Explorer view, right click 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 that is listed.
- Right click the
browse
package you created,
and select New > Class.
The New Java Class dialog box opens.
- 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 opens in the editor.