diff --git a/core/org.eclipse.cdt.core/plugin.xml b/core/org.eclipse.cdt.core/plugin.xml index e810fe008f9..6174b57e379 100644 --- a/core/org.eclipse.cdt.core/plugin.xml +++ b/core/org.eclipse.cdt.core/plugin.xml @@ -18,7 +18,7 @@ - + diff --git a/core/org.eclipse.cdt.core/schema/ErrorParser.exsd b/core/org.eclipse.cdt.core/schema/ErrorParser.exsd new file mode 100644 index 00000000000..a4ce450e13c --- /dev/null +++ b/core/org.eclipse.cdt.core/schema/ErrorParser.exsd @@ -0,0 +1,139 @@ + + + + + + + + + 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. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + a fully qualified name of the Java class that implements <samp>org.eclipse.cdt.core.IErrorParser</samp> interface. + + + + + + + + + + + + + + + CDT 1.2 + + + + + + + + + <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/> + + + + + + + + + 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. + + + + + + + + + For another example of implementation see org.eclipse.cdt.internal.errorparsers.GCCErrorParser + + + + + + + + + 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/> + + + + + \ No newline at end of file