Class Annotation

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String TYPE_UNKNOWN
      Constant for unknown annotation types.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Annotation()
      Creates a new annotation that is not persistent and type less.
        Annotation​(boolean isPersistent)
      Creates a new annotation with the given persistence state.
        Annotation​(java.lang.String type, boolean isPersistent, java.lang.String text)
      Creates a new annotation with the given properties.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getText()
      Returns the text associated with this annotation.
      java.lang.String getType()
      Returns the type of the annotation.
      boolean isMarkedDeleted()
      Returns whether this annotation is marked as deleted.
      boolean isPersistent()
      Returns whether this annotation is persistent.
      void markDeleted​(boolean deleted)
      Marks this annotation deleted according to the value of the deleted parameter.
      void setText​(java.lang.String text)
      Sets the text associated with this annotation.
      void setType​(java.lang.String type)
      Sets the type of this annotation.
      • Methods inherited from class java.lang.Object

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

      • TYPE_UNKNOWN

        public static final java.lang.String TYPE_UNKNOWN
        Constant for unknown annotation types.

        Value: "org.eclipse.text.annotation.unknown"

        Since:
        3.0
        See Also:
        Constant Field Values
    • Constructor Detail

      • Annotation

        protected Annotation()
        Creates a new annotation that is not persistent and type less.
      • Annotation

        public Annotation​(java.lang.String type,
                          boolean isPersistent,
                          java.lang.String text)
        Creates a new annotation with the given properties.
        Parameters:
        type - the unique name of this annotation type
        isPersistent - true if this annotation is persistent, false otherwise
        text - the text associated with this annotation
        Since:
        3.0
      • Annotation

        public Annotation​(boolean isPersistent)
        Creates a new annotation with the given persistence state.
        Parameters:
        isPersistent - true if persistent, false otherwise
        Since:
        3.0
    • Method Detail

      • isPersistent

        public boolean isPersistent()
        Returns whether this annotation is persistent.
        Returns:
        true if this annotation is persistent, false otherwise
        Since:
        3.0
      • setType

        public void setType​(java.lang.String type)
        Sets the type of this annotation.
        Parameters:
        type - the annotation type
        Since:
        3.0
      • getType

        public java.lang.String getType()
        Returns the type of the annotation.
        Returns:
        the type of the annotation
        Since:
        3.0
      • markDeleted

        public void markDeleted​(boolean deleted)
        Marks this annotation deleted according to the value of the deleted parameter.
        Parameters:
        deleted - true if annotation should be marked as deleted
        Since:
        3.0
      • isMarkedDeleted

        public boolean isMarkedDeleted()
        Returns whether this annotation is marked as deleted.
        Returns:
        true if annotation is marked as deleted, false otherwise
        Since:
        3.0
      • setText

        public void setText​(java.lang.String text)
        Sets the text associated with this annotation.
        Parameters:
        text - the text associated with this annotation
        Since:
        3.0
      • getText

        public java.lang.String getText()
        Returns the text associated with this annotation.
        Returns:
        the text associated with this annotation or null
        Since:
        3.0