|
Eclipse Platform Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.text.edits.TextEdit org.eclipse.text.edits.MultiTextEdit
A multi-text edit can be used to aggregate several edits into one edit. The edit itself doesn't modify a document.
Clients are allowed to implement subclasses of a multi-text edit.Subclasses must implement doCopy() to ensure the a copy of the right type is created. Not implementing doCopy() in subclasses will result in an assertion failure during copying.
Field Summary |
Fields inherited from class org.eclipse.text.edits.TextEdit |
CREATE_UNDO, NONE, UPDATE_REGIONS |
Constructor Summary | |
MultiTextEdit()
Creates a new MultiTextEdit. | |
MultiTextEdit(int offset,
int length)
Creates a new MultiTextEdit for the given range. | |
protected | MultiTextEdit(MultiTextEdit other)
|
Method Summary | |
protected void | accept0(TextEditVisitor visitor)
Accepts the given visitor on a type-specific visit of the current edit. |
protected boolean | canZeroLengthCover()
Returns true if an edit with length zero can cover another edit. |
protected void | checkIntegrity()
Checks the edit's integrity. |
protected TextEdit | doCopy()
Creates and returns a copy of this edit. |
Methods inherited from class org.eclipse.text.edits.TextEdit |
accept, acceptChildren, addChild, addChildren, apply, apply, copy, covers, equals, getChildren, getChildrenSize, getCoverage, getExclusiveEnd, getInclusiveEnd, getLength, getOffset, getParent, getRegion, hasChildren, hashCode, isDeleted, postProcessCopy, removeChild, removeChild, removeChildren, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MultiTextEdit()
public MultiTextEdit(int offset, int length)
protected MultiTextEdit(MultiTextEdit other)
Method Detail |
protected void checkIntegrity() throws MalformedTreeException
Note that this method should only be called by the edit framework and not by normal clients.
This default implementation does nothing. Subclasses may override if needed.
protected boolean canZeroLengthCover()
protected TextEdit doCopy()
Implementers of this method should use the copy constructor Edit#Edit(Edit source) to initialize the edit part of the copy. Implementors aren't responsible to actually copy the children or to set the right parent.
This method should not be called from outside the framework. Please use copy to create a copy of a edit tree.
protected void accept0(TextEditVisitor visitor)
General template for implementation on each concrete TextEdit class:
boolean visitChildren = visitor.visit(this); if (visitChildren) { acceptChildren(visitor); }Note that the caller (accept) takes care of invoking visitor.preVisit(this) and visitor.postVisit(this).
|
Eclipse Platform Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.