Method Summary |
|
void | aboutToBeAdded(TextEdit parent) |
final public void | accept(TextEditVisitor visitor) Accepts the given visitor on a visit of the current edit. |
abstract protected void | accept0(TextEditVisitor visitor) Accepts the given visitor on a type-specific visit of the current edit. |
final protected void | acceptChildren(TextEditVisitor visitor) Accepts the given visitor on the edits children. |
final public void | addChild(TextEdit child) Adds the given edit child to this edit.
Parameters: child - the child edit to add exception: MalformedTreeException - is thrown if the childedit can't be added to this edit. |
final public void | addChildren(TextEdit[] edits) Adds all edits in edits to this edit. |
void | adjustLength(int delta) Adjusts the edits length according to the given
delta. |
void | adjustOffset(int delta) Adjusts the edits offset according to the given
delta. |
final public UndoEdit | apply(IDocument document, int style) Applies the edit tree rooted by this edit to the given document. |
final public UndoEdit | apply(IDocument document) Applies the edit tree rooted by this edit to the given document. |
protected boolean | canZeroLengthCover() Returns true if an edit with length zero can cover
another edit. |
protected void | childDocumentUpdated() Hook method called when the document updating of a child edit has been
completed. |
protected void | childRegionUpdated() Hook method called when the region updating of a child edit has been
completed. |
final public TextEdit | copy() Creates a deep copy of the edit tree rooted at this
edit. |
public boolean | covers(TextEdit other) Returns true if the edit covers the given edit
other . |
abstract boolean | deleteChildren() |
void | deleteTree() |
void | dispatchCheckIntegrity(TextEditProcessor processor) |
UndoEdit | dispatchPerformEdits(TextEditProcessor processor) |
abstract protected TextEdit | doCopy() Creates and returns a copy of this edit. |
final public boolean | equals(Object obj) The Edit implementation of this Object
method uses object identity (==). |
final public TextEdit[] | getChildren() Returns the edit's children. |
final public int | getChildrenSize() Returns the size of the managed children. |
public static IRegion | getCoverage(TextEdit[] edits) Returns the text range spawned by the given array of text edits.
The method requires that the given array contains at least one
edit. |
final public int | getExclusiveEnd() Returns the exclusive end position of this edit. |
final public int | getInclusiveEnd() Returns the inclusive end position of this edit. |
public int | getLength() Returns the length of the edit. |
public int | getOffset() Returns the offset of the edit. |
final public TextEdit | getParent() Returns the edit's parent. |
final public IRegion | getRegion() Returns the range that this edit is manipulating. |
final public TextEdit | getRoot() Returns the root edit of the edit tree. |
final public boolean | hasChildren() Returns true if this edit has children. |
final public int | hashCode() The Edit implementation of this Object
method calls uses Object#hashCode() to compute its
hash code. |
void | internalAdd(TextEdit child) |
List | internalGetChildren() |
void | internalMoveTree(int delta) |
void | internalSetChildren(List children) |
void | internalSetLength(int length) |
void | internalSetOffset(int offset) |
void | internalSetParent(TextEdit parent) |
void | internalToString(StringBuffer buffer, int indent) Adds the string representation of this text edit without
children information to the given string buffer. |
boolean | isDefined() Returns whether the region of this edit is defined or not. |
final public boolean | isDeleted() Returns whether this edit has been deleted or not. |
void | markAsDeleted() Marks the edit as deleted. |
final public void | moveTree(int delta) Move all offsets in the tree by the given delta. |
void | performConsistencyCheck(TextEditProcessor processor, IDocument document) |
abstract int | performDocumentUpdating(IDocument document) |
void | performRegionUpdating(int accumulatedDelta, boolean delete) |
void | performSourceComputation(TextEditProcessor processor, IDocument document) |
protected void | postProcessCopy(TextEditCopier copier) This method is called on every edit of the copied tree to do some
post-processing like connected an edit to a different edit in the tree. |
final public TextEdit | removeChild(int index) Removes the edit specified by the given index from the list
of children. |
final public boolean | removeChild(TextEdit child) Removes the first occurrence of the given child from the list
of children. |
final public TextEdit[] | removeChildren() Removes all child edits from and returns them. |
public String | toString() |
int | traverseConsistencyCheck(TextEditProcessor processor, IDocument document, List sourceEdits) Traverses the edit tree to perform the consistency check. |
int | traverseDocumentUpdating(TextEditProcessor processor, IDocument document) |
int | traverseRegionUpdating(TextEditProcessor processor, IDocument document, int accumulatedDelta, boolean delete) |
void | traverseSourceComputation(TextEditProcessor processor, IDocument document) |