2009-04-09 12:48:44 +00:00
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="org.eclipse.cdt.codan.ui" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
<meta.schema plugin="org.eclipse.cdt.codan.ui" id="checkers" name="Code Analysis Checkers"/>
</appinfo>
<documentation>
Define chckers for Code Analysis framework.
</documentation>
</annotation>
<element name="extension">
<annotation>
<appinfo>
<meta.element />
</appinfo>
</annotation>
<complexType>
<sequence minOccurs="1" maxOccurs="unbounded">
<choice>
<element ref="checker"/>
<element ref="category"/>
</choice>
</sequence>
<attribute name="point" type="string" use="required">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="id" type="string">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="name" type="string">
<annotation>
<documentation>
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="checker">
<annotation>
<documentation>
2010-08-04 01:23:33 +00:00
Checker Element.
Sets id, name and class that implements checker
2009-04-09 12:48:44 +00:00
</documentation>
</annotation>
<complexType>
<sequence minOccurs="0" maxOccurs="unbounded">
2010-08-04 01:13:15 +00:00
<element ref="problem"/>
2009-04-09 12:48:44 +00:00
</sequence>
<attribute name="id" type="string" use="required">
<annotation>
<documentation>
Checker id.
</documentation>
</annotation>
</attribute>
<attribute name="class" type="string" use="required">
<annotation>
<documentation>
Checker class. Must implement IChecker.
</documentation>
<appinfo>
<meta.attribute kind="java" basedOn=":org.eclipse.cdt.codan.core.model.IChecker"/>
</appinfo>
</annotation>
</attribute>
<attribute name="name" type="string">
<annotation>
<documentation>
2010-08-04 01:23:33 +00:00
User Friendly name of the chcker, currently not used. Will default to a class name.
2009-04-09 12:48:44 +00:00
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="problem">
<annotation>
<documentation>
2010-08-04 01:23:33 +00:00
Problem meta-data.
2009-04-09 12:48:44 +00:00
</documentation>
</annotation>
<complexType>
<attribute name="id" type="string" use="required">
<annotation>
<documentation>
Error id. Should be prefixed by plugin name in general.
</documentation>
</annotation>
</attribute>
<attribute name="name" type="string">
<annotation>
<documentation>
2010-08-04 01:23:33 +00:00
User Friendly name of the error. Would be displyed to enable/disable a problem and get access to problem properties.
Should be as short as possible, but recogniziable.
2009-04-09 12:48:44 +00:00
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
<attribute name="defaultSeverity" use="default" value="Warning">
<annotation>
<documentation>
2010-08-04 01:23:33 +00:00
Set defult problem severity. User can override later. Default is Warning.
2009-04-09 12:48:44 +00:00
</documentation>
</annotation>
<simpleType>
<restriction base="string">
<enumeration value="Error">
</enumeration>
<enumeration value="Warning">
</enumeration>
<enumeration value="Info">
</enumeration>
</restriction>
</simpleType>
</attribute>
<attribute name="category" type="string">
<annotation>
<documentation>
2010-08-04 01:23:33 +00:00
Category id for the problem. There are few that are defined in core codan plugin, other user defined. If none specified it would be "Programming Problems".
2009-04-09 12:48:44 +00:00
</documentation>
<appinfo>
<meta.attribute kind="identifier" basedOn="org.eclipse.cdt.codan.core.checkers/category/@id"/>
</appinfo>
</annotation>
</attribute>
2010-02-19 02:29:18 +00:00
<attribute name="defaultEnabled" type="boolean" use="default" value="true">
<annotation>
<documentation>
If problem is enabled in original profile. Default is true.
</documentation>
</annotation>
</attribute>
2010-03-08 21:05:57 +00:00
<attribute name="messagePattern" type="string">
<annotation>
<documentation>
2010-08-04 01:23:33 +00:00
Default error message pattern. Use java pattern notation (such as {0} to replace with first problem argument, and so on. To place single quote ' in a message - use quot symbol twice '').
For example message pattern
Invalid argument ''{0}''
would be printed as
Invalid argument 'xxx'
where xxx what checker would post as an argument for the problem.
2010-03-08 21:05:57 +00:00
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
2010-03-23 03:07:14 +00:00
<attribute name="description" type="string">
<annotation>
<documentation>
2010-08-04 01:23:33 +00:00
Short description of the problem. Help user to understand that message means. Can be used as tooltip.
2010-03-23 03:07:14 +00:00
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
2010-05-04 02:46:01 +00:00
<attribute name="markerType" type="string">
<annotation>
<documentation>
Marker type to use to generate problem, default is the generic codan marker
</documentation>
<appinfo>
<meta.attribute kind="identifier" basedOn="org.eclipse.core.resources.markers/@id"/>
</appinfo>
</annotation>
</attribute>
2011-03-20 01:53:23 +00:00
<attribute name="multiple" type="boolean">
<annotation>
<documentation>
Can user duplicate this problem to have multiple instances (each instance can have diffrent scope, arguments, severity, etc.
</documentation>
</annotation>
</attribute>
2009-04-09 12:48:44 +00:00
</complexType>
</element>
<element name="category">
2010-08-04 01:23:33 +00:00
<annotation>
<documentation>
Category for problem. Allows to group problems for the user.
</documentation>
</annotation>
2009-04-09 12:48:44 +00:00
<complexType>
<attribute name="id" type="string" use="required">
<annotation>
<documentation>
2010-08-04 01:23:33 +00:00
Unique qualified category id.
2009-04-09 12:48:44 +00:00
</documentation>
</annotation>
</attribute>
<attribute name="name" type="string" use="required">
<annotation>
<documentation>
2010-08-04 01:23:33 +00:00
User visible name of the category
2009-04-09 12:48:44 +00:00
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
<attribute name="parentCategory" type="string">
<annotation>
<documentation>
2010-08-04 01:23:33 +00:00
Id of the parent category. Root is used if not specified.
2009-04-09 12:48:44 +00:00
</documentation>
<appinfo>
<meta.attribute kind="identifier" basedOn="org.eclipse.cdt.codan.core.checkers/category/@id"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<annotation>
<appinfo>
<meta.section type="since"/>
</appinfo>
<documentation>
1.0
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="examples"/>
</appinfo>
<documentation>
The following is an example of a single checker definition:
<p>
<pre>
<extension
point="org.eclipse.cdt.codan.ui.checkers">
<checker
class="org.aaa.AssignmentInConditionChecker"
id="org.aaa.AssignmentInConditionChecker"
name="Possible Assignment in Condition instead of comparision">
</checker>
</extension>
</pre>
</p>
The following is an example of a checker that produces two types of errors:
<p>
<pre>
<extension
point="org.eclipse.cdt.codan.ui.checkers">
<checker
class="org.aaa.NullPointerDereferenceChecker"
id="org.aaa.NullPointerDereferenceChecker"
name="Null Pointer Dereference checker">
<problem id="org.aaa.npe_must" name="Null Pointer Dereference"/ defaultSeverity="Error">
<problem id="org.aaa.npe_may" name="Possible Null Pointer Dereference"/>
</checker>
</extension>
</pre>
</p>
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="apiinfo"/>
</appinfo>
<documentation>
[Enter API information here.]
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="implementation"/>
</appinfo>
<documentation>
[Enter information about supplied implementation of this extension point.]
</documentation>
</annotation>
</schema>