Class ErrorPattern
java.lang.Object
org.eclipse.cdt.core.errorparsers.ErrorPattern
Error Pattern - used by Error Parser to convert build output to problem markers
- Since:
- 5.1 Clients may extend this class.
-
Constructor Summary
ConstructorDescriptionErrorPattern
(String pattern) Pattern for errors that should be skipped.ErrorPattern
(String pattern, int groupDesc, int severity) Pattern for errors not associated file a file (e.g.ErrorPattern
(String pattern, int groupFileName, int groupLineNum, int groupDesc, int groupVarName, int severity) Full Pattern Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetFileName
(Matcher matcher) int
getLineNum
(Matcher matcher) protected org.eclipse.core.runtime.IPath
getLocation
(String filename) If the file designated by filename exists, return the IPath representation of the filename If it does not exist, try cygpath translationgetMatcher
(CharSequence input) int
getSeverity
(Matcher matcher) getVarName
(Matcher matcher) boolean
processLine
(String line, ErrorParserManager eoParser) Parse a line of build output and register error/warning for Problems view.protected boolean
recordError
(Matcher matcher, ErrorParserManager eoParser) Register the error inErrorParserManager
.
-
Constructor Details
-
ErrorPattern
public ErrorPattern(String pattern, int groupFileName, int groupLineNum, int groupDesc, int groupVarName, int severity) Full Pattern Constructor. Note that a group equal -1 means that the parameter is missing in the error message.- Parameters:
pattern
- - regular expression describing the messagegroupFileName
- - matcher group of file namegroupLineNum
- - matcher group of line numbergroupDesc
- - matcher group of descriptiongroupVarName
- - matcher group of variable nameseverity
- - severity, one ofIMarkerGenerator.SEVERITY_INFO
,IMarkerGenerator.SEVERITY_WARNING
,IMarkerGenerator.SEVERITY_ERROR_RESOURCE
,IMarkerGenerator.SEVERITY_ERROR_BUILD
-
ErrorPattern
Pattern for errors not associated file a file (e.g. make and linker errors).- Parameters:
pattern
- - regular expression describing the messagegroupDesc
- - matcher group of descriptionseverity
- - severity, one ofIMarkerGenerator.SEVERITY_INFO
,IMarkerGenerator.SEVERITY_WARNING
,IMarkerGenerator.SEVERITY_ERROR_RESOURCE
,IMarkerGenerator.SEVERITY_ERROR_BUILD
-
ErrorPattern
Pattern for errors that should be skipped.- Parameters:
pattern
- - error pattern.
-
-
Method Details
-
getMatcher
- Parameters:
input
- - input line.- Returns:
- matcher to interpret the input line.
-
getFileName
- Parameters:
matcher
- - matcher to parse the input line.- Returns:
- parsed file name or
null
.
-
getLineNum
- Parameters:
matcher
- - matcher to parse the input line.- Returns:
- parsed line number or
0
.
-
getDesc
- Parameters:
matcher
- - matcher to parse the input line.- Returns:
- parsed description or
null
.
-
getVarName
- Parameters:
matcher
- - matcher to parse the input line.- Returns:
- parsed variable name or
null
.
-
getSeverity
- Parameters:
matcher
- - matcher to parse the input line.- Returns:
- severity of the problem.
-
processLine
Parse a line of build output and register error/warning for Problems view.- Parameters:
line
- - one line of output.eoParser
- -ErrorParserManager
.- Returns:
true
if error/warning/info problem was found.
-
recordError
Register the error inErrorParserManager
.- Parameters:
matcher
- - matcher to parse the input line.eoParser
- -ErrorParserManager
.- Returns:
true
indicating that error was found.
-
getLocation
If the file designated by filename exists, return the IPath representation of the filename If it does not exist, try cygpath translation- Parameters:
filename
- - file name- Returns:
- location (outside of the workspace).
-