This topic describes how to create a feature and how to
add a custom rule plug-in to a feature.
The first step in installing a custom rule plug-in is to add the
plug-in to a feature. This task is described in the following subtopics:
Creating a feature
Note: You
can add plug-ins to a feature while you are creating the feature.
To
create a new feature for a custom rule plug-in:
- Open the Plug-in Development perspective.
- Click . The New Feature
wizard opens.
- On the first page of the wizard, titled Feature Properties:
- Enter information in the required fields:
- Project name: Type a name for the feature
project.
- Feature ID: Type an ID for the feature
itself. The default value is the feature project name.
- Feature name: Type a name for the feature.
The default value is the feature project name.
- Feature version: Enter a valid version
ID. The default value is 1.0.0.qualifier.
- Click Next.
- On the second page of the wizard, titled Referenced Plug-ins and
Fragments:
- If you want to add one or more plug-ins to the new feature now:
- Select the check box for each plug-in that you want to add.
- Click Finish.
The wizard creates the
feature plug-in project, adds it to the Package Explorer, and opens
the feature.xml file in the feature manifest
editor.
- Close the feature manifest editor for now.
Adding a plug-in to a
feature
You can add one or more plug-ins to a feature. To
add a plug-in:
- Open the Plug-in Development perspective.
- In the Package Explorer, expand the feature.
- Right-click the feature.xml file and click . The editor opens and displays the feature information.
- In the feature manifest editor:
- Follow these steps for each plug-in that you want to add:
- Click the Plug-ins tab.
- Click Add. The Plug-in Selection window
opens.
- In the window:
- In the input field, type a few sequential characters from the
name of the plug-in.
Note: Here you can use an asterisk (*) as a wild-card
character but only as part of a character string. The asterisk (*)
when not combined with any other characters does not match anything.
- In the Matching items list, select the
plug-in that you want to add to the feature.
- Click OK.
The plug-in is added to the feature.
- To update any information pertaining to the plug-in that you just
added, click the appropriate tab and make the updates.
- You can update the version number of the feature itself to indicate
that the contents of the feature have changed. To update the version,
click the Overview tab and enter the new version
information in the Version field.
- Close the feature manifest editor.
Updating a plug-in
in a feature
To update a plug-in in a
feature with a more recent version:- Open the Plug-in Development perspective.
- In the Package Explorer, expand the feature.
- Right-click the feature.xml file and click . The editor opens and displays the feature information.
- In the feature manifest editor:
- Click the Plug-ins tab.
- Delete the old version of the plug-in from the
feature:
- In the left pane, right-click the old version of the plug-in.
- Click Delete.
- Add the new version of the plug-in to the feature, as described
in the previous topic, Adding a plug-in to a feature.
- Close the feature manifest editor.