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 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.