Class MarkerItem


  • public abstract class MarkerItem
    extends java.lang.Object
    The MarkerItem class is the class that represents the objects displayed at IMarker related views. This class is not intended to be sub-classed by clients.
    Since:
    3.4
    • Constructor Summary

      Constructors 
      Constructor Description
      MarkerItem()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean getAttributeValue​(java.lang.String attribute, boolean defaultValue)
      Return the boolean associated with attributeName or defaultValue if it is not found.
      int getAttributeValue​(java.lang.String attribute, int defaultValue)
      Get the value of the attribute in the enclosed marker.
      java.lang.String getAttributeValue​(java.lang.String attribute, java.lang.String defaultValue)
      Get the String value of the attribute in the enclosed marker.
      java.lang.String getLocation()
      Get the location string for the receiver.
      IMarker getMarker()
      Return the marker for the receiver.
      java.lang.String getPath()
      Get the path string for the receiver.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MarkerItem

        public MarkerItem()
    • Method Detail

      • getAttributeValue

        public boolean getAttributeValue​(java.lang.String attribute,
                                         boolean defaultValue)
        Return the boolean associated with attributeName or defaultValue if it is not found.
        Parameters:
        attribute - the attribute
        defaultValue - the defaultValue if the value is not set
        Returns:
        boolean
      • getAttributeValue

        public int getAttributeValue​(java.lang.String attribute,
                                     int defaultValue)
        Get the value of the attribute in the enclosed marker.
        Parameters:
        attribute - the attribute
        defaultValue - the defaultValue if the value is not set
        Returns:
        int
      • getAttributeValue

        public java.lang.String getAttributeValue​(java.lang.String attribute,
                                                  java.lang.String defaultValue)
        Get the String value of the attribute in the enclosed marker.
        Parameters:
        attribute - the attribute
        defaultValue - the defaultValue if the value is not set
        Returns:
        String
      • getLocation

        public java.lang.String getLocation()
        Get the location string for the receiver. This method is provided for convenience purposes as the location can be inferred from a line number or location attribute if the MarkerItem has an associated IMarker.
        Returns:
        String
        See Also:
        IMarker.LOCATION, IMarker.LINE_NUMBER
      • getPath

        public java.lang.String getPath()
        Get the path string for the receiver. This method is provided for convenience as a path can be inferred from the location of an IResource or the path attribute if the MarkerItem has an associated IMarker.
        Returns:
        String
        See Also:
        MarkerItemDefaults.PATH_ATTRIBUTE, IResource.getLocation()
      • getMarker

        public IMarker getMarker()
        Return the marker for the receiver.
        Returns:
        IMarker