|
Eclipse Platform Release 3.3 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.ui.texteditor.MarkerUtilities
Utility class for accessing marker attributes. The static methods provided
on this class provide internal exception handling (unexpected
CoreExceptions 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 String |
getMarkerType(IMarker marker)
Returns the marker type of the given marker or null if
the type could not be determined. |
static String |
getMessage(IMarker marker)
Returns the message associated with the given marker. |
static int |
getPriority(IMarker marker)
Returns the priority of the given marker. |
static int |
getSeverity(IMarker marker)
Returns the severity of the given marker. |
static String[] |
getSuperTypes(String markerType)
Returns the list of super types for 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 int getSeverity(IMarker marker)
marker - the marker
IMarker.SEVERITY_INFO if not setIMarker.SEVERITY,
IMarker.SEVERITY_INFO,
IMarker.getAttribute(java.lang.String,int)
public static boolean isMarkerType(IMarker marker,
String type)
marker - the marker to be checkedtype - the reference type
trueif maker is an instance of the reference typepublic static String getMarkerType(IMarker marker)
null if
the type could not be determined.
marker - the marker
public static String getMessage(IMarker marker)
marker - the marker
null
public 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)public static String[] getSuperTypes(String markerType)
markerType - the marker's type
|
Eclipse Platform Release 3.3 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.