Class ConcreteMarker

java.lang.Object
org.eclipse.ui.views.markers.internal.MarkerNode
org.eclipse.ui.views.markers.internal.ConcreteMarker
Direct Known Subclasses:
ProblemMarker, TaskMarker

public class ConcreteMarker extends MarkerNode
This is a concrete class that stores the same type of information as the IMarkers used by the IDE. This class exists as an optimization. The various get* methods on IMarker are extremely slow, which makes it very slow to sort markers (for example, in the problems view). This marker class stores the fields in the most efficient form for sorting and display, but necessarily removes some generality from IMarker.
  • Constructor Details

    • ConcreteMarker

      public ConcreteMarker(IMarker toCopy)
  • Method Details

    • clearCache

      public void clearCache()
      Clears any cached information. This frees up some memory, but will slow down the next comparison operation. It is a good idea to call this on a set of markers after sorting them, in order to reduce their memory cost.
    • refresh

      public void refresh()
      Refresh the properties of this marker from the underlying IMarker instance
    • getResource

      public IResource getResource()
    • getType

      public String getType()
    • getDescription

      public String getDescription()
      Description copied from class: MarkerNode
      Return the description of the receiver.
      Specified by:
      getDescription in class MarkerNode
      Returns:
      String
    • getDescriptionKey

      public CollationKey getDescriptionKey()
    • getResourceName

      public String getResourceName()
    • getResourceNameKey

      public CollationKey getResourceNameKey()
    • getLine

      public int getLine()
    • getFolder

      public String getFolder()
    • getCreationTime

      public long getCreationTime()
    • getId

      public long getId()
      The underlying marker ID value.
      Returns:
      the marker's ID.
    • getMarker

      public IMarker getMarker()
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • setCategory

      public void setCategory(MarkerNode category)
      Set the category the receiver is in.
    • getChildren

      public MarkerNode[] getChildren()
      Description copied from class: MarkerNode
      Get the children of the node.
      Specified by:
      getChildren in class MarkerNode
      Returns:
      MarkerNode[]
    • getParent

      public MarkerNode getParent()
      Description copied from class: MarkerNode
      Return the parent node or null if this is a top level element.
      Specified by:
      getParent in class MarkerNode
      Returns:
      MarkerNode
    • isConcrete

      public boolean isConcrete()
      Description copied from class: MarkerNode
      Return whether or not this is a concrete node
      Specified by:
      isConcrete in class MarkerNode
      Returns:
      boolean
    • getShortFolder

      public String getShortFolder()
      Return the short name for the folder.
      Returns:
      String
    • getLocationString

      public String getLocationString()
      Get the location string. If the IMarker.LOCATION attribute was not set then return an empty String.
      Returns:
      String
    • getGroup

      public Object getGroup()
      Get the group for the receiver.
      Returns:
      Returns the group.
    • setGroup

      public void setGroup(Object group)
      Set the group name.
      Parameters:
      group - the group name
    • getConcreteRepresentative

      public ConcreteMarker getConcreteRepresentative()
      Description copied from class: MarkerNode
      Get a concrete marker from the receiver. If the receiver is concrete return the receiver otherwise return one of the concrete markers it contains.
      Specified by:
      getConcreteRepresentative in class MarkerNode
      Returns:
      ConcreteMarker