Package org.eclipse.ui.views.markers.internal

# Class Util

java.lang.Object
org.eclipse.ui.views.markers.internal.Util

public final class Util extends Object
The Util class is the class of general utilities used by the marker support.

## Method Summary

Modifier and Type
Method
Description
`static 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 timestamp
`static 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 container
`static boolean`
`isEditable(IMarker marker)`
Return whether or not the marker is editable.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### getProperty

public static String getProperty(String property, IMarker marker)
Get the propery called property from the marker. If it is not found return the empty string.

Returns:
  String

### getCreationTime

public static String getCreationTime(long timestamp)
Get the human readable creation time from the timestamp

Returns:
  String

### getCreationTime

public static String getCreationTime(IMarker marker)
Get the human readable creation time from the marker.

Returns:
  String

### getContainerName

public static String getContainerName(IMarker marker)
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

public static boolean isEditable(IMarker marker)
Return whether or not the marker is editable.

Returns:
  boolean `true` if it is editable

### errorStatus

public static IStatus errorStatus(Throwable exception)
Return an error status for the given exception.

Returns:
  IStatus

### getImage

public static Image getImage(int severity)
Get the image for the severity if it can be identified.

Returns:
  Image or `null`

### getShortContainerName

public static String getShortContainerName(IMarker marker)
Get the short name for the container

Returns:
  String

### allConcreteSelection

public static boolean allConcreteSelection(IStructuredSelection selection)
Return whether or not all of the elements in the selection are concrete.

Returns:
  `true` if all of the elements are concrete.