Package org.eclipse.handly.text
Interface IDocumentChange
-
- All Known Implementing Classes:
DocumentChange,DocumentChangeOperation.UndoChange
public interface IDocumentChangeDescribes a change to be applied to anIDocument.- See Also:
DocumentChangeOperation- Restriction:
- This interface is not intended to be extended by clients.
- Restriction:
- This interface is not intended to be implemented by clients.
-
-
Field Summary
Fields Modifier and Type Field Description static intCREATE_UNDOFlags indicating that applying a change to a document is supposed to create a corresponding undo change.static intNONEFlag indicating that neitherCREATE_UNDOnorUPDATE_REGIONSis set.static intUPDATE_REGIONSFlag indicating that edit regions in the change's edit tree will be updated to reflect their positions in the changed document.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ISnapshotgetBase()Returns the snapshot on which this change's edit tree is based, ornullif the snapshot is unknown.org.eclipse.text.edits.TextEditgetEdit()Returns the edit tree associated with this change.intgetStyle()Returns the style flags associated with this change.
-
-
-
Field Detail
-
NONE
static final int NONE
Flag indicating that neitherCREATE_UNDOnorUPDATE_REGIONSis set.- See Also:
getStyle(), Constant Field Values
-
CREATE_UNDO
static final int CREATE_UNDO
Flags indicating that applying a change to a document is supposed to create a corresponding undo change. If not specified,nullis returned fromDocumentChangeOperation.execute()method.- See Also:
getStyle(), Constant Field Values
-
UPDATE_REGIONS
static final int UPDATE_REGIONS
Flag indicating that edit regions in the change's edit tree will be updated to reflect their positions in the changed document. If not specified, the edit regions will be arbitrary; it is even not guaranteed that the edit tree is still well formed after applying the change.- See Also:
getStyle(), Constant Field Values
-
-
Method Detail
-
getEdit
org.eclipse.text.edits.TextEdit getEdit()
Returns the edit tree associated with this change.- Returns:
- the change's edit tree (never
null)
-
getBase
ISnapshot getBase()
Returns the snapshot on which this change's edit tree is based, ornullif the snapshot is unknown.- Returns:
- the snapshot on which the change is based,
or
nullif unknown
-
getStyle
int getStyle()
Returns the style flags associated with this change. May returnNONEor any combination ofCREATE_UNDOandUPDATE_REGIONSflags.- Returns:
- the change's style flags
-
-