Package org.eclipse.cdt.core
Class ProblemMarkerInfo
- java.lang.Object
-
- org.eclipse.cdt.core.ProblemMarkerInfo
-
public class ProblemMarkerInfo extends Object
ProblemMarkerInfo
is an object used to pass error properties toErrorParserManager
. The information stored in this object will later be used to create anIMarker
byACBuilder
- See Also:
ErrorParserManager.addProblemMarker(ProblemMarkerInfo)
,ErrorParserManager.generateMarker(IResource, int, String, int, String)
,ErrorParserManager.generateExternalMarker(IResource, int, String, int, String, IPath)
- Restriction:
- This class is not intended to be subclassed by clients.
-
-
Field Summary
Fields Modifier and Type Field 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 Summary
Constructors Constructor Description ProblemMarkerInfo(org.eclipse.core.resources.IResource file, int lineNumber, int startChar, int endChar, String description, int severity, String variableName)
Create a newProblemMarkerInfo
object.ProblemMarkerInfo(org.eclipse.core.resources.IResource file, int lineNumber, String description, int severity, String variableName)
Create a newProblemMarkerInfo
object.ProblemMarkerInfo(org.eclipse.core.resources.IResource file, int lineNumber, String description, int severity, String variableName, org.eclipse.core.runtime.IPath externalPath)
Create a newProblemMarkerInfo
object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Field Detail
-
file
public org.eclipse.core.resources.IResource file
-
lineNumber
public int lineNumber
-
startChar
public int startChar
- Since:
- 5.4
-
endChar
public int endChar
- Since:
- 5.4
-
description
public String description
-
severity
public int severity
-
variableName
public String variableName
-
externalPath
public org.eclipse.core.runtime.IPath externalPath
-
-
Constructor Detail
-
ProblemMarkerInfo
public ProblemMarkerInfo(org.eclipse.core.resources.IResource file, int lineNumber, String description, int severity, String variableName)
Create a newProblemMarkerInfo
object.- Parameters:
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, seeIMarkerGenerator
for acceptable severity values.variableName
- - the name of the variable involved in the error if any.
-
ProblemMarkerInfo
public ProblemMarkerInfo(org.eclipse.core.resources.IResource file, int lineNumber, int startChar, int endChar, String description, int severity, String variableName)
Create a newProblemMarkerInfo
object.- Parameters:
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, seeIMarkerGenerator
for acceptable severity values.variableName
- - the name of the variable involved in the error if any.- Since:
- 5.4
-
ProblemMarkerInfo
public ProblemMarkerInfo(org.eclipse.core.resources.IResource file, int lineNumber, String description, int severity, String variableName, org.eclipse.core.runtime.IPath externalPath)
Create a newProblemMarkerInfo
object.- Parameters:
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, seeIMarkerGenerator
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.
-
-
Method Detail
-
getAttributes
public Map<String,String> getAttributes()
Get the attribute map.- Returns:
- Map of attributes and their values.
- Since:
- 5.4
-
getAttribute
public String getAttribute(String key)
Return the value of the attribute with the given key, or null if no such attribute exists.- Parameters:
key
- - attribute key.- Returns:
- attribute value
- Since:
- 5.4
-
setAttribute
public 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.- Parameters:
key
- - attribute key.value
- - new attribute value.- Since:
- 5.4
-
getType
public String getType()
Return the type of this problem marker or null if type was not set.- Returns:
- the type.
- Since:
- 5.4
-
setType
public void setType(String type)
Set the type of this problem marker.- Parameters:
type
- - the new type.- Since:
- 5.4
-
isDeferDeDuplication
public boolean isDeferDeDuplication()
Flag marker for potential deferred de-duplication. SeeACBuilder.deDuplicate()
- Returns:
- the deferDeDuplication
- Since:
- 6.3
-
setDeferDeDuplication
public void setDeferDeDuplication(boolean deferDeDuplication)
Flag marker for potential deferred de-duplication. SeeACBuilder.deDuplicate()
- Parameters:
deferDeDuplication
- the deferDeDuplication to set- Since:
- 6.3
-
-