| <?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> |