This lesson will guide you through defining extension points,
including dependencies, creating an extension to the plug-in, and
modifying the Activator class to customize the context
menu options.
Note: Before you complete this lesson, you should create
an Eclipse plug-in project with the following attributes:
- Project Name : com.ibm.carma.plugin.disable.programatically
- ID : com.ibm.carma.plugin.disable.programatically
- Name : CARMA_Modify_Actions
Plug-in
To define the extensions and dependencies for your
plug-in project:
- Make sure you are in the Plug-in Development perspective.
- In the Package Explorer view, right
click on com.ibm.carma.plugin.disable.programatically,
your plug-in project, and select PDE Tools > Open
Manifest. The Plug-in Editor will
open.
- From the list of tabs at the bottom of the Plug-in
Editor, select Extensions.
- Click the Add button on the Extensions page.
- In the New Extension dialog box
that opens, type the extension name, org.eclipse.ui.startup in
the Extension Point filter text field.
- When this extension appears in the panel below, select
it, and click Finish. You will see the extension
appear in the panel of the Extension page of
the Plug-in Editor.
- You do not need to specify any attributes to this extension.
Adding this extension just tells Eclipse to run your plug-in when
the workbench starts up.
- While you are still in the Plug-in Editor,
you should also add the dependencies that the plugin will need. To
do this, select the Dependencies tab from the
bottom menu of tabs.
- In the left panel, Required Plug-ins,
make sure com.ibm.carma.ui is listed. If it is not,
click Add, and filter for the particular plug-in.
Select it, and click Finish.