Package org.eclipse.text.undo
Class DocumentUndoEvent
java.lang.Object
org.eclipse.text.undo.DocumentUndoEvent
Describes document changes initiated by undo or redo.
Clients are not supposed to subclass or create instances of this class.
- Since:
- 3.2
- See Also:
- Restriction:
- This class is not intended to be subclassed by clients.
- Restriction:
- This class is not intended to be instantiated by clients.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Indicates that the described document event is about to be redone.static final int
Indicates that the described document event is about to be undone.static final int
Indicates that the described document event is a compound undo or redo event.static final int
Indicates that the described document event has been redone.static final int
Indicates that the described document event has been undone. -
Method Summary
Modifier and TypeMethodDescriptionReturns the changed document.int
Returns the type of event that is occurring.int
Returns the offset of the change.Returns the text that has been replaced.Returns the source that triggered this event.getText()
Returns the text that has been inserted.boolean
Returns whether the change was a compound change or not.
-
Field Details
-
ABOUT_TO_UNDO
public static final int ABOUT_TO_UNDOIndicates that the described document event is about to be undone.- See Also:
-
ABOUT_TO_REDO
public static final int ABOUT_TO_REDOIndicates that the described document event is about to be redone.- See Also:
-
UNDONE
public static final int UNDONEIndicates that the described document event has been undone.- See Also:
-
REDONE
public static final int REDONEIndicates that the described document event has been redone.- See Also:
-
COMPOUND
public static final int COMPOUNDIndicates that the described document event is a compound undo or redo event.- See Also:
-
-
Method Details
-
getDocument
Returns the changed document.- Returns:
- the changed document
-
getOffset
public int getOffset()Returns the offset of the change.- Returns:
- the offset of the change
-
getText
Returns the text that has been inserted.- Returns:
- the text that has been inserted
-
getPreservedText
Returns the text that has been replaced.- Returns:
- the text that has been replaced
-
getEventType
public int getEventType()Returns the type of event that is occurring.- Returns:
- the bit mask that indicates the type (or types) of the event
-
getSource
Returns the source that triggered this event.- Returns:
- the source that triggered this event.
-
isCompound
public boolean isCompound()Returns whether the change was a compound change or not.- Returns:
true
if the undo or redo change is a compound change,false
if it is not
-