|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.ui.texteditor.MarkerUtilities
Utility class for accessing marker attributes. The static methods provided
on this class provide internal exception handling (unexpected
CoreException
s are logged to workbench).
This class provides static methods only; it is not intended to be instantiated or subclassed by clients.
Method Summary | |
static void |
createMarker(IResource resource,
Map attributes,
String markerType)
Creates a marker on the given resource with the given type and attributes. |
static int |
getCharEnd(IMarker marker)
Returns the ending character offset of the given marker. |
static int |
getCharStart(IMarker marker)
Returns the starting character offset of the given marker. |
static int |
getLineNumber(IMarker marker)
Returns the line number of the given marker. |
static int |
getPriority(IMarker marker)
Returns the priority of the given marker. |
static boolean |
isMarkerType(IMarker marker,
String type)
Returns whether the given marker is of the given type (either directly or indirectly). |
static void |
setCharEnd(IMarker marker,
int charEnd)
Sets the ending character offset of the given marker. |
static void |
setCharEnd(Map map,
int charEnd)
Sets the ending character offset in the given map using the standard marker attribute name as the key. |
static void |
setCharStart(IMarker marker,
int charStart)
Sets the starting character offset of the given marker. |
static void |
setCharStart(Map map,
int charStart)
Sets the starting character offset in the given map using the standard marker attribute name as the key. |
static void |
setLineNumber(IMarker marker,
int lineNum)
Sets the line number of the given marker. |
static void |
setLineNumber(Map map,
int lineNum)
Sets the line number in the given map using the standard marker attribute name as the key. |
static void |
setMessage(Map map,
String message)
Sets the message in the given map using the standard marker attribute name as the key. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static int getCharEnd(IMarker marker)
marker
- the marker
-1
if not setIMarker.CHAR_END
,
IMarker.getAttribute(java.lang.String,int)
public static int getCharStart(IMarker marker)
marker
- the marker
-1
if not setIMarker.CHAR_START
,
IMarker.getAttribute(java.lang.String,int)
public static int getLineNumber(IMarker marker)
marker
- the marker
-1
if not setIMarker.LINE_NUMBER
,
IMarker.getAttribute(java.lang.String,int)
public static int getPriority(IMarker marker)
marker
- the marker
IMarker.PRIORITY_NORMAL
if not setIMarker.PRIORITY
,
IMarker.PRIORITY_NORMAL
,
IMarker.getAttribute(java.lang.String,int)
public static boolean isMarkerType(IMarker marker, String type)
marker
- the marker to be checkedtype
- the reference type
true
if maker is an instance of the reference typepublic static void setCharEnd(IMarker marker, int charEnd)
marker
- the markercharEnd
- the ending character offsetIMarker.CHAR_END
,
IMarker.setAttribute(java.lang.String,int)
public static void setCharEnd(Map map, int charEnd)
map
- the map (key type: String
, value type:
Object
)charEnd
- the ending character offsetIMarker.CHAR_END
public static void setCharStart(IMarker marker, int charStart)
marker
- the markercharStart
- the starting character offsetIMarker.CHAR_START
,
IMarker.setAttribute(java.lang.String,int)
public static void setCharStart(Map map, int charStart)
map
- the map (key type: String
, value type:
Object
)charStart
- the starting character offsetIMarker.CHAR_START
public static void setLineNumber(IMarker marker, int lineNum)
marker
- the markerlineNum
- the line numberIMarker.LINE_NUMBER
,
IMarker.setAttribute(java.lang.String,int)
public static void setLineNumber(Map map, int lineNum)
map
- the map (key type: String
, value type:
Object
)lineNum
- the line numberIMarker.LINE_NUMBER
public static void setMessage(Map map, String message)
map
- the map (key type: String
, value type:
Object
)message
- the messageIMarker.MESSAGE
public static void createMarker(IResource resource, Map attributes, String markerType) throws CoreException
This method modifies the workspace (progress is not reported to the user).
resource
- the resourceattributes
- the attribute map (key type: String
,
value type: Object
)markerType
- the type of marker
CoreException
- if this method failsIResource.createMarker(java.lang.String)
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |