A complex textual edition can be described by a tree of
TextEdits. An edit
can be applied to an
IDocument by calling
TextEdit.apply or by
TextEditProcessor. Applying a text edit can record a reverse edit
description that can be used to undo the edition.
- replace a document range:
- delete a document range:
- insert text:
- track a range while the document is being modified:
Other subclasses of
TextEdit exist for specialized tasks. Use
compose a complex edit tree, or subclass it to provide a custom edit.
Interface Summary Interface Description ISourceModifierA source modifier can be used to modify the source of a move or copy edit before it gets inserted at the target position.
Class Summary Class Description CopyingRangeMarkerA
CopyingRangeMarkercan be used to track positions when executing text edits.
CopySourceEditA copy source edit denotes the source of a copy operation. CopyTargetEditA copy target edit denotes the target of a copy operation. DeleteEditText edit to delete a range in a document. InsertEditText edit to insert a text at a given position in a document. MoveSourceEditA move source edit denotes the source of a move operation. MoveTargetEditA move target edit denotes the target of a move operation. MultiTextEditA multi-text edit can be used to aggregate several edits into one edit. RangeMarkerA range marker can be used to track positions when executing text edits. ReplaceEditText edit to replace a range in a document with a different string. TextEditA text edit describes an elementary text manipulation operation. TextEditCopierCopies a tree of text edits. TextEditGroupA text edit group combines a list of
TextEdits and a name into a single object.
TextEditProcessormanages a set of edits and applies them as a whole to an
TextEditVisitorA visitor for text edits. UndoEditThis class encapsulates the reverse changes of an executed text edit tree.
Exception Summary Exception Description MalformedTreeExceptionThrown to indicate that an edit got added to a parent edit but the child edit somehow conflicts with the parent or one of it siblings.