Class Util
java.lang.Object
org.eclipse.ui.views.markers.internal.Util
The Util class is the class of general utilities used by the marker support.
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
allConcreteSelection
(IStructuredSelection selection) Return whether or not all of the elements in the selection are concrete.static IStatus
errorStatus
(Throwable exception) Return an error status for the given exception.static String
getContainerName
(IMarker marker) Get the name of the container.static String
getCreationTime
(long timestamp) Get the human readable creation time from the timestampstatic String
getCreationTime
(IMarker marker) Get the human readable creation time from the marker.static Image
getImage
(int severity) Get the image for the severity if it can be identified.static String
getProperty
(String property, IMarker marker) Get the propery called property from the marker.static String
getShortContainerName
(IMarker marker) Get the short name for the containerstatic boolean
isEditable
(IMarker marker) Return whether or not the marker is editable.
-
Method Details
-
getProperty
Get the propery called property from the marker. If it is not found return the empty string.- Returns:
- String
-
getCreationTime
Get the human readable creation time from the timestamp- Returns:
- String
-
getCreationTime
Get the human readable creation time from the marker.- Returns:
- String
-
getContainerName
Get the name of the container. If the marker has the MarkerViewUtil#PATH_ATTRIBUTE set use that. Otherwise use the path of the parent resource.- Returns:
- String
-
isEditable
Return whether or not the marker is editable.- Returns:
- boolean
true
if it is editable
-
errorStatus
Return an error status for the given exception.- Returns:
- IStatus
-
getImage
Get the image for the severity if it can be identified.- Returns:
- Image or
null
-
getShortContainerName
Get the short name for the container- Returns:
- String
-
allConcreteSelection
Return whether or not all of the elements in the selection are concrete.- Returns:
true
if all of the elements are concrete.
-