public class ProblemMarkerInfo extends Object
ProblemMarkerInfo
is an object used to pass error properties to ErrorParserManager
.
The information stored in this object will later be used to create an IMarker
by ACBuilder
ErrorParserManager.addProblemMarker(ProblemMarkerInfo)
,
ErrorParserManager.generateMarker(IResource, int, String, int, String)
,
ErrorParserManager.generateExternalMarker(IResource, int, String, int, String, IPath)
Modifier and Type | Field and Description |
---|---|
String |
description |
int |
endChar |
org.eclipse.core.runtime.IPath |
externalPath |
org.eclipse.core.resources.IResource |
file |
int |
lineNumber |
int |
severity |
int |
startChar |
String |
variableName |
Constructor and Description |
---|
ProblemMarkerInfo(org.eclipse.core.resources.IResource file,
int lineNumber,
int startChar,
int endChar,
String description,
int severity,
String variableName)
Create a new
ProblemMarkerInfo object. |
ProblemMarkerInfo(org.eclipse.core.resources.IResource file,
int lineNumber,
String description,
int severity,
String variableName)
Create a new
ProblemMarkerInfo object. |
ProblemMarkerInfo(org.eclipse.core.resources.IResource file,
int lineNumber,
String description,
int severity,
String variableName,
org.eclipse.core.runtime.IPath externalPath)
Create a new
ProblemMarkerInfo object. |
Modifier and Type | Method and Description |
---|---|
String |
getAttribute(String key)
Return the value of the attribute with the given key,
or null if no such attribute exists.
|
Map<String,String> |
getAttributes()
Get the attribute map.
|
String |
getType()
Return the type of this problem marker or null
if type was not set.
|
boolean |
isDeferDeDuplication()
Flag marker for potential deferred de-duplication.
|
void |
setAttribute(String key,
String value)
Set the value of the attribute with the given key
to the given value, or add one if one does not already
exist.
|
void |
setDeferDeDuplication(boolean deferDeDuplication)
Flag marker for potential deferred de-duplication.
|
void |
setType(String type)
Set the type of this problem marker.
|
public org.eclipse.core.resources.IResource file
public int lineNumber
public int startChar
public int endChar
public String description
public int severity
public String variableName
public org.eclipse.core.runtime.IPath externalPath
public ProblemMarkerInfo(org.eclipse.core.resources.IResource file, int lineNumber, String description, int severity, String variableName)
ProblemMarkerInfo
object.file
- - the file where the problem has occurred.lineNumber
- - the line number of the problem.description
- - a description of the problem.severity
- - the severity of the problem, see IMarkerGenerator
for acceptable severity values.variableName
- - the name of the variable involved in the error if any.public ProblemMarkerInfo(org.eclipse.core.resources.IResource file, int lineNumber, int startChar, int endChar, String description, int severity, String variableName)
ProblemMarkerInfo
object.file
- - the file where the problem has occurred.lineNumber
- - the line number of the problem.startChar
- - start char of the problem.endChar
- - end char of the problem.description
- - a description of the problem.severity
- - the severity of the problem, see IMarkerGenerator
for acceptable severity values.variableName
- - the name of the variable involved in the error if any.public ProblemMarkerInfo(org.eclipse.core.resources.IResource file, int lineNumber, String description, int severity, String variableName, org.eclipse.core.runtime.IPath externalPath)
ProblemMarkerInfo
object.file
- - the file where the problem has occurred.lineNumber
- - the line number of the problem.description
- - a description of the problem.severity
- - the severity of the problem, see IMarkerGenerator
for acceptable severity valuesvariableName
- - the name of the variable involved in the error if any.externalPath
- - if this error involves a file outside the workspace this parameter should
contain the path to that file.public Map<String,String> getAttributes()
public String getAttribute(String key)
key
- - attribute key.public void setAttribute(String key, String value)
key
- - attribute key.value
- - new attribute value.public String getType()
public void setType(String type)
type
- - the new type.public boolean isDeferDeDuplication()
ACBuilder.deDuplicate()
public void setDeferDeDuplication(boolean deferDeDuplication)
ACBuilder.deDuplicate()
deferDeDuplication
- the deferDeDuplication to setCopyright (c) IBM Corp. and others 2004, 2020. All Rights Reserved.