public class ErrorPattern extends Object
Constructor and Description |
---|
ErrorPattern(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.
|
Modifier and Type | Method and Description |
---|---|
String |
getDesc(Matcher matcher) |
String |
getFileName(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 translation
|
Matcher |
getMatcher(CharSequence input) |
int |
getSeverity(Matcher matcher) |
String |
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 in
ErrorParserManager . |
public ErrorPattern(String pattern, int groupFileName, int groupLineNum, int groupDesc, int groupVarName, int severity)
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 of
IMarkerGenerator.SEVERITY_INFO
,
IMarkerGenerator.SEVERITY_WARNING
,
IMarkerGenerator.SEVERITY_ERROR_RESOURCE
,
IMarkerGenerator.SEVERITY_ERROR_BUILD
public ErrorPattern(String pattern, int groupDesc, int severity)
pattern
- - regular expression describing the messagegroupDesc
- - matcher group of descriptionseverity
- - severity, one of
IMarkerGenerator.SEVERITY_INFO
,
IMarkerGenerator.SEVERITY_WARNING
,
IMarkerGenerator.SEVERITY_ERROR_RESOURCE
,
IMarkerGenerator.SEVERITY_ERROR_BUILD
public ErrorPattern(String pattern)
pattern
- - error pattern.public Matcher getMatcher(CharSequence input)
input
- - input line.public String getFileName(Matcher matcher)
matcher
- - matcher to parse the input line.null
.public int getLineNum(Matcher matcher)
matcher
- - matcher to parse the input line.0
.public String getDesc(Matcher matcher)
matcher
- - matcher to parse the input line.null
.public String getVarName(Matcher matcher)
matcher
- - matcher to parse the input line.null
.public int getSeverity(Matcher matcher)
matcher
- - matcher to parse the input line.public boolean processLine(String line, ErrorParserManager eoParser)
line
- - one line of output.eoParser
- - ErrorParserManager
.true
if error/warning/info problem was found.protected boolean recordError(Matcher matcher, ErrorParserManager eoParser)
ErrorParserManager
.matcher
- - matcher to parse the input line.eoParser
- - ErrorParserManager
.true
indicating that error was found.protected org.eclipse.core.runtime.IPath getLocation(String filename)
filename
- - file nameCopyright (c) IBM Corp. and others 2004, 2020. All Rights Reserved.