ErrorParser
Identifier:
org.eclipse.cdt.core.ErrorParser
Since:
CDT 1.2
Description:
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.
Configuration Markup:
<!ELEMENT extension (errorparser)>
<!ATTLIST extension
id CDATA #REQUIRED
name CDATA #REQUIRED
point CDATA #REQUIRED
>
<!ELEMENT errorparser EMPTY>
<!ATTLIST errorparser
class CDATA #REQUIRED
>
- class - a fully qualified name of the Java class that implements org.eclipse.cdt.core.IErrorParser interface.
Examples:
package org.eclipse.cdt.example.errorparser;
import org.eclipse.cdt.core.IMarkerGenerator;
import org.eclipse.cdt.core.errorparsers.AbstractErrorParser;
import org.eclipse.cdt.core.errorparsers.ErrorPattern;
/**
* Simple error parser parsing lines of kind "FILE,LINE:error DESCRIPTION"
* Enable the errorparser in project Properties->C/C++ Build->Settings->Error Parsers
*/
public class SampleErrorParser extends AbstractErrorParser {
private static final ErrorPattern[] patterns = {
new ErrorPattern("(.*),(.*):error (.*)", 1, 2, 3, 0, IMarkerGenerator.SEVERITY_ERROR_RESOURCE),
new ErrorPattern("(.*),(.*):warning (.*)", 1, 2, 3, 0, IMarkerGenerator.SEVERITY_WARNING),
new ErrorPattern("(.*),(.*):info (.*)", 1, 2, 3, 0, IMarkerGenerator.SEVERITY_INFO),
};
/**
* Constructor to set the error pattern.
*/
public SampleErrorParser() {
super(patterns);
}
}
API Information:
Plug-ins that want to extend this extension point must implement org.eclipse.cdt.core.IErrorParser interface.
It is recommended to extend org.eclipse.cdt.core.errorparsers.AbstractErrorParser for most cases.
ErrorParsers dealing with multi-line messages should implement org.eclipse.cdt.core.IErrorParser2 interface.
Supplied Implementation:
For another example of implementation see org.eclipse.cdt.internal.errorparsers.GCCErrorParser
Copyright (c) 2005, 2009 Andrew Gvozdev (Quoin Inc.) and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html