The New Plug-in Project wizard generates
a plugin.xml file that includes a rule extension
for each new user-written code rule. The wizard also creates a category extension
if the category to which the rule belongs does not exist.
The extensions are used to register the new user-written
rule and its category with Eclipse. Figure 1 shows the form of a rule extension:Figure 1. Extension for a user-written rule
Note: The attribute values are described in Table 1 following.
If the category does not exist, the
wizard also adds an extension for the category to the plugin.xml file.Figure 2 shows the form of a category extension:Figure 2. Extension for the category of a
user-written rule
Note:If you are creating a
PL/I rule plug-in, the provider attribute is codereview.pl1.analysisProvider. The other attribute values are
described in Table 1 following.
Table 1 shows how the attributes of the <analysisRule> and
the <analysisCategory> elements are derived
from the values that you enter in the Plug-in Project wizard:
In the <analysisRule> element, the category, ruleclass, ruleid,
and rulelabel attributes are set to the values that
you entered on the COBOL or
PL/I Rule Template page of the wizard. The wizard also uses the ruleclass value
to set the rule ID.
In the <analysisCategory> element, the id and label attributes
are set to the values that you entered on the COBOL or PL/I Rule Template page
of the wizard.
The package name is set to the string that you specified in the ID field
of the package definition, on the Content page
of the New Plug-in Project wizard. It is shown
in the Example value column of the table as com.example
Table 1. Attributes values for analysisRule
and analysisCategory
Attribute:
Field on the COBOL
or PL/I Rule Template wizard page: