Class BufferChange

    • Constructor Summary

      Constructors 
      Constructor Description
      BufferChange​(org.eclipse.text.edits.TextEdit edit)
      Creates a new buffer change with the given text edit, CREATE_UNDO|UPDATE_REGIONS style and KEEP_SAVED_STATE save mode.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean contains​(org.eclipse.text.edits.TextEdit edit)
      Tells whether this change contains the given edit.
      ISnapshot getBase()
      Returns the snapshot on which this change's edit tree is based, or null if the snapshot is unknown.
      org.eclipse.text.edits.TextEdit getEdit()
      Returns the edit tree associated with this change.
      SaveMode getSaveMode()
      Returns the save mode associated with this change.
      int getStyle()
      Returns the style flags associated with this change.
      void setBase​(ISnapshot base)
      Sets the snapshot on which this change is based.
      void setSaveMode​(SaveMode saveMode)
      Sets the save mode of this change.
      void setStyle​(int style)
      Sets the style flags for this change.
      • Methods inherited from class java.lang.Object

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

      • BufferChange

        public BufferChange​(org.eclipse.text.edits.TextEdit edit)
        Creates a new buffer change with the given text edit, CREATE_UNDO|UPDATE_REGIONS style and KEEP_SAVED_STATE save mode.
        Parameters:
        edit - a text edit (not null)
    • Method Detail

      • setBase

        public void setBase​(ISnapshot base)
        Sets the snapshot on which this change is based.
        Parameters:
        base - the snapshot on which the change is based, or null if unknown
      • setSaveMode

        public void setSaveMode​(SaveMode saveMode)
        Sets the save mode of this change.
        Parameters:
        saveMode - a save mode
      • getEdit

        public org.eclipse.text.edits.TextEdit getEdit()
        Description copied from interface: IBufferChange
        Returns the edit tree associated with this change.
        Specified by:
        getEdit in interface IBufferChange
        Returns:
        the change's edit tree (never null)
      • contains

        public boolean contains​(org.eclipse.text.edits.TextEdit edit)
        Description copied from interface: IBufferChange
        Tells whether this change contains the given edit. Note that, in general, this is orthogonal to whether the change's edit tree contains that edit. The edits that are not contained by the change must not be executed when the change is applied.
        Specified by:
        contains in interface IBufferChange
        Parameters:
        edit - a text edit
        Returns:
        true if the change contains the given edit, and false otherwise
      • getBase

        public ISnapshot getBase()
        Description copied from interface: IBufferChange
        Returns the snapshot on which this change's edit tree is based, or null if the snapshot is unknown.
        Specified by:
        getBase in interface IBufferChange
        Returns:
        the snapshot on which the change is based, or null if unknown
      • getSaveMode

        public SaveMode getSaveMode()
        Description copied from interface: IBufferChange
        Returns the save mode associated with this change.
        Specified by:
        getSaveMode in interface IBufferChange
        Returns:
        the change's save mode