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. Extension for a user-written rule shows the form of a rule extension:Figure 1. Extension for a user-written rule
If the category does not exist, the wizard also adds
an extension for the category to the plugin.xml file.Extension for the category of a
user-written rule shows the form of a category extension:Figure 2. Extension for the category of a
user-written rule
In the <analysisRule> element, the category, ruleclass, ruleid,
and rulelabel attributes are set to the values that
you entered on the EGL 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 EGL 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