1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244
|
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="org.eclipse.cdt.core" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appInfo>
<meta.schema plugin="org.eclipse.cdt.core" id="ErrorParser" name="ErrorParser"/>
</appInfo>
<documentation>
This extension point is used to contribute a new Error Parser. A Error Parser is used to parse errors/warnings/info from build output and populate Problems View with them.
</documentation>
</annotation>
<element name="extension">
<annotation>
<appInfo>
<meta.element />
</appInfo>
</annotation>
<complexType>
<sequence>
<element ref="errorparser"/>
</sequence>
<attribute name="id" type="string" use="required">
<annotation>
<documentation>
ID of the extension point (Simple ID)
</documentation>
</annotation>
</attribute>
<attribute name="name" type="string" use="required">
<annotation>
<documentation>
Name of the extension point
</documentation>
</annotation>
</attribute>
<attribute name="point" type="string" use="required">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<element name="errorparser">
<complexType>
<sequence>
<element ref="pattern" minOccurs="0" maxOccurs="unbounded"/>
<element ref="context" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="id" type="string">
<annotation>
<documentation>
ID of the error parser. If attribute is missing error parser ID is constructed appending Simple ID of extension to plugin ID.
</documentation>
<appInfo>
<meta.attribute kind="identifier"/>
</appInfo>
</annotation>
</attribute>
<attribute name="name" type="string">
<annotation>
<documentation>
Name of the error parser. If this attribute is missing extension name is taken.
</documentation>
<appInfo>
<meta.attribute translatable="true"/>
</appInfo>
</annotation>
</attribute>
<attribute name="class" type="string" use="default" value="org.eclipse.cdt.core.errorparsers.RegexErrorParser">
<annotation>
<documentation>
a fully qualified name of the Java class that implements <samp>org.eclipse.cdt.core.IErrorParser</samp>
</documentation>
<appInfo>
<meta.attribute kind="java" basedOn=":org.eclipse.cdt.core.errorparsers.IErrorParser"/>
</appInfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="pattern">
<annotation>
<documentation>
Use element "pattern" to configure RegexErrorParser.
</documentation>
</annotation>
<complexType>
<attribute name="severity" use="required">
<annotation>
<documentation>
This attribute specifies which severity should be used to display the marker in Problems View. There are 3 levels of severity, "Error", "Warning" and "Info". The forth option, "Ignore" tells the system to stop checking the line against the other patterns without causing it to show up in the Problems View.
</documentation>
</annotation>
<simpleType>
<restriction base="string">
<enumeration value="Error">
</enumeration>
<enumeration value="Warning">
</enumeration>
<enumeration value="Info">
</enumeration>
<enumeration value="Ignore">
</enumeration>
</restriction>
</simpleType>
</attribute>
<attribute name="regex" type="string" use="default" value="(.*)">
<annotation>
<documentation>
Java regular expression which defines capturing groups for file-expr, line-expr and description-expr.
</documentation>
</annotation>
</attribute>
<attribute name="file-expr" type="string">
<annotation>
<documentation>
"Replacement" expression composed from capturing groups defined in regex to define the file.
</documentation>
</annotation>
</attribute>
<attribute name="line-expr" type="string">
<annotation>
<documentation>
"Replacement" expression composed from capturing groups defined in regex to define the line in file.
</documentation>
</annotation>
</attribute>
<attribute name="description-expr" type="string" use="default" value="$1">
<annotation>
<documentation>
"Replacement" expression composed from capturing groups defined in regex to define the description (i.e. "$1: $2"). It is possible to specify more than one capturing group in such expression.
</documentation>
</annotation>
</attribute>
<attribute name="variable-expr" type="string">
<annotation>
<documentation>
"Replacement" expression composed from capturing groups defined in regex to define variable. The value will be assigned to marker attributes but is not used by CDT currently.
</documentation>
</annotation>
</attribute>
<attribute name="eat-processed-line" type="boolean" use="required">
<annotation>
<documentation>
The attribute defines if a line matched by the pattern is prevented or allowed to be processed by the rest of the patterns. "false" allows several patterns to evaluate the same line.
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<element name="context">
<annotation>
<documentation>
Use this element to specify the context where an error parser can be used. If none is specified, the default context type will be "build".
An example of a context type is "build". Only error parsers in this context are used to parse build output. You can see these error parsers in the "C/C++" > "Build" > "Settings" preference page.
An error parser can be assigned to more than one context type. Clients contributing error parsers are free to define their own context types.
</documentation>
</annotation>
<complexType>
<attribute name="type" type="string" use="required">
<annotation>
<documentation>
The type of context where an error parser can be used.
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<annotation>
<appInfo>
<meta.section type="since"/>
</appInfo>
<documentation>
CDT 1.2
</documentation>
</annotation>
<annotation>
<appInfo>
<meta.section type="examples"/>
</appInfo>
<documentation>
package org.eclipse.cdt.example.errorparser;<br/>
<br/>
import org.eclipse.cdt.core.IMarkerGenerator;<br/>
import org.eclipse.cdt.core.errorparsers.AbstractErrorParser;<br/>
import org.eclipse.cdt.core.errorparsers.ErrorPattern;<br/>
<br/>
/**<br/>
* Simple error parser parsing lines of kind "FILE,LINE:error DESCRIPTION"<br/>
* Enable the errorparser in project Properties->C/C++ Build->Settings->Error Parsers<br/>
*/<br/>
public class SampleErrorParser extends AbstractErrorParser {<br/>
private static final ErrorPattern[] patterns = {<br/>
new ErrorPattern("(.*),(.*):error (.*)", 1, 2, 3, 0, IMarkerGenerator.SEVERITY_ERROR_RESOURCE),<br/>
new ErrorPattern("(.*),(.*):warning (.*)", 1, 2, 3, 0, IMarkerGenerator.SEVERITY_WARNING),<br/>
new ErrorPattern("(.*),(.*):info (.*)", 1, 2, 3, 0, IMarkerGenerator.SEVERITY_INFO),<br/>
};<br/>
/**<br/>
* Constructor to set the error pattern.<br/>
*/<br/>
public SampleErrorParser() {<br/>
super(patterns);<br/>
}<br/>
}<br/>
</documentation>
</annotation>
<annotation>
<appInfo>
<meta.section type="apiinfo"/>
</appInfo>
<documentation>
Plug-ins that want to extend this extension point must implement <samp>org.eclipse.cdt.core.IErrorParser</samp> interface.
<br/>
For most cases it is sufficient to configure RegexErrorParser which is provided by default.
Another good choice is to extend <samp>org.eclipse.cdt.core.errorparsers.AbstractErrorParser</samp> as done in the example.
<br/>
ErrorParsers dealing with multi-line messages should implement <samp>org.eclipse.cdt.core.IErrorParser2</samp> interface.
</documentation>
</annotation>
<annotation>
<appInfo>
<meta.section type="implementation"/>
</appInfo>
<documentation>
For another example of implementation see org.eclipse.cdt.internal.errorparsers.GCCErrorParser
</documentation>
</annotation>
<annotation>
<appInfo>
<meta.section type="copyright"/>
</appInfo>
<documentation>
Copyright (c) 2005, 2009 Andrew Gvozdev (Quoin Inc.) and others.<br/>
This program and the accompanying materials<br/>
are made available under the terms of the Eclipse Public License 2.0<br/>
which accompanies this distribution, and is available at<br/>
https://www.eclipse.org/legal/epl-2.0/
SPDX-License-Identifier: EPL-2.0<br/>
</documentation>
</annotation>
</schema>
|