mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 14:55:41 +02:00
Bug 189109 Add ErrorParser extension point schema
This commit is contained in:
parent
f4081e6fc9
commit
16ad8a3172
2 changed files with 140 additions and 1 deletions
|
@ -18,7 +18,7 @@
|
||||||
<!-- =================================================================================== -->
|
<!-- =================================================================================== -->
|
||||||
<!-- Extension Point: IErrorParser, error parsers use when building -->
|
<!-- Extension Point: IErrorParser, error parsers use when building -->
|
||||||
<!-- =================================================================================== -->
|
<!-- =================================================================================== -->
|
||||||
<extension-point id="ErrorParser" name="%ErrorParser.name"/>
|
<extension-point id="ErrorParser" name="%ErrorParser.name" schema="schema/ErrorParser.exsd"/>
|
||||||
<!-- =================================================================================== -->
|
<!-- =================================================================================== -->
|
||||||
<!-- Extension Point: IBinaryParser, use to detect wheter an IFile is a binary -->
|
<!-- Extension Point: IBinaryParser, use to detect wheter an IFile is a binary -->
|
||||||
<!-- =================================================================================== -->
|
<!-- =================================================================================== -->
|
||||||
|
|
139
core/org.eclipse.cdt.core/schema/ErrorParser.exsd
Normal file
139
core/org.eclipse.cdt.core/schema/ErrorParser.exsd
Normal file
|
@ -0,0 +1,139 @@
|
||||||
|
<?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>
|
||||||
|
|
||||||
|
</documentation>
|
||||||
|
</annotation>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="name" type="string" use="required">
|
||||||
|
<annotation>
|
||||||
|
<documentation>
|
||||||
|
|
||||||
|
</documentation>
|
||||||
|
</annotation>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="point" type="string" use="required">
|
||||||
|
<annotation>
|
||||||
|
<documentation>
|
||||||
|
|
||||||
|
</documentation>
|
||||||
|
</annotation>
|
||||||
|
</attribute>
|
||||||
|
</complexType>
|
||||||
|
</element>
|
||||||
|
|
||||||
|
<element name="errorparser">
|
||||||
|
<complexType>
|
||||||
|
<attribute name="class" type="string" use="required">
|
||||||
|
<annotation>
|
||||||
|
<documentation>
|
||||||
|
a fully qualified name of the Java class that implements <samp>org.eclipse.cdt.core.IErrorParser</samp> interface.
|
||||||
|
</documentation>
|
||||||
|
<appInfo>
|
||||||
|
<meta.attribute kind="java" basedOn=":org.eclipse.cdt.core.IErrorParser"/>
|
||||||
|
</appInfo>
|
||||||
|
</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>
|
||||||
|
<br/>
|
||||||
|
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/>
|
||||||
|
It is recommended to extend <samp>org.eclipse.cdt.core.errorparsers.AbstractErrorParser</samp> for most cases.
|
||||||
|
<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/>
|
||||||
|
All rights reserved. This program and the accompanying materials<br/>
|
||||||
|
are made available under the terms of the Eclipse Public License v1.0<br/>
|
||||||
|
which accompanies this distribution, and is available at<br/>
|
||||||
|
http://www.eclipse.org/legal/epl-v10.html<br/>
|
||||||
|
|
||||||
|
</documentation>
|
||||||
|
</annotation>
|
||||||
|
|
||||||
|
</schema>
|
Loading…
Add table
Reference in a new issue