Package org.eclipse.text.edits
Class TextEditVisitor
 java.lang.Object

 org.eclipse.text.edits.TextEditVisitor

public class TextEditVisitor extends Object
A visitor for text edits.For each different concrete text edit type T there is a method:
public boolean visit(T node)
 Visits the given edit to perform some arbitrary operation. Iftrue
is returned, the given edit's child edits will be visited next; however, iffalse
is returned, the given edit's child edits will not be visited. The default implementation provided by this class calls a generic methodvisitNode(TextEdit node)
. Subclasses may reimplement these method as needed.
In addition, there are methods for visiting text edits in the abstract, regardless of node type:
public void preVisit(TextEdit edit)
 Visits the given edit to perform some arbitrary operation. This method is invoked prior to the appropriate typespecificvisit
method. The default implementation of this method does nothing. Subclasses may reimplement this method as needed.public void postVisit(TextEdit edit)
 Visits the given edit to perform some arbitrary operation. This method is invoked after the appropriate typespecificendVisit
method. The default implementation of this method does nothing. Subclasses may reimplement this method as needed.
For edits with children, the child nodes are visited in increasing order.
 Since:
 3.0
 See Also:
TextEdit.accept(TextEditVisitor)


Constructor Summary
Constructors Constructor Description TextEditVisitor()

Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
postVisit(TextEdit edit)
Visits the given text edit following the typespecific visit (afterendVisit
).void
preVisit(TextEdit edit)
Visits the given text edit prior to the typespecific visit.boolean
visit(CopyingRangeMarker edit)
Visits aCopyingRangeMarker
instance.boolean
visit(CopySourceEdit edit)
Visits aCopySourceEdit
instance.boolean
visit(CopyTargetEdit edit)
Visits aCopyTargetEdit
instance.boolean
visit(DeleteEdit edit)
Visits aDeleteEdit
instance.boolean
visit(InsertEdit edit)
Visits aInsertEdit
instance.boolean
visit(MoveSourceEdit edit)
Visits aMoveSourceEdit
instance.boolean
visit(MoveTargetEdit edit)
Visits aMoveTargetEdit
instance.boolean
visit(MultiTextEdit edit)
Visits aMultiTextEdit
instance.boolean
visit(RangeMarker edit)
Visits aRangeMarker
instance.boolean
visit(ReplaceEdit edit)
Visits aReplaceEdit
instance.boolean
visit(UndoEdit edit)
Visits aUndoEdit
instance.boolean
visitNode(TextEdit edit)
Visits the given text edit.



Method Detail

preVisit
public void preVisit(TextEdit edit)
Visits the given text edit prior to the typespecific visit. (beforevisit
).The default implementation does nothing. Subclasses may reimplement.
 Parameters:
edit
 the node to visit

postVisit
public void postVisit(TextEdit edit)
Visits the given text edit following the typespecific visit (afterendVisit
).The default implementation does nothing. Subclasses may reimplement.
 Parameters:
edit
 the node to visit

visitNode
public boolean visitNode(TextEdit edit)
Visits the given text edit. This method is called by default from typespecific visits. It is not called by an edit's accept method. The default implementation returnstrue
. Parameters:
edit
 the node to visit Returns:
 If
true
is returned, the given node's child nodes will be visited next; however, iffalse
is returned, the given node's child nodes will not be visited.

visit
public boolean visit(CopySourceEdit edit)
Visits aCopySourceEdit
instance. Parameters:
edit
 the node to visit Returns:
 If
true
is returned, the given node's child nodes will be visited next; however, iffalse
is returned, the given node's child nodes will not be visited.

visit
public boolean visit(CopyTargetEdit edit)
Visits aCopyTargetEdit
instance. Parameters:
edit
 the node to visit Returns:
 If
true
is returned, the given node's child nodes will be visited next; however, iffalse
is returned, the given node's child nodes will not be visited.

visit
public boolean visit(MoveSourceEdit edit)
Visits aMoveSourceEdit
instance. Parameters:
edit
 the node to visit Returns:
 If
true
is returned, the given node's child nodes will be visited next; however, iffalse
is returned, the given node's child nodes will not be visited.

visit
public boolean visit(MoveTargetEdit edit)
Visits aMoveTargetEdit
instance. Parameters:
edit
 the node to visit Returns:
 If
true
is returned, the given node's child nodes will be visited next; however, iffalse
is returned, the given node's child nodes will not be visited.

visit
public boolean visit(RangeMarker edit)
Visits aRangeMarker
instance. Parameters:
edit
 the node to visit Returns:
 If
true
is returned, the given node's child nodes will be visited next; however, iffalse
is returned, the given node's child nodes will not be visited.

visit
public boolean visit(CopyingRangeMarker edit)
Visits aCopyingRangeMarker
instance. Parameters:
edit
 the node to visit Returns:
 If
true
is returned, the given node's child nodes will be visited next; however, iffalse
is returned, the given node's child nodes will not be visited.

visit
public boolean visit(DeleteEdit edit)
Visits aDeleteEdit
instance. Parameters:
edit
 the node to visit Returns:
 If
true
is returned, the given node's child nodes will be visited next; however, iffalse
is returned, the given node's child nodes will not be visited.

visit
public boolean visit(InsertEdit edit)
Visits aInsertEdit
instance. Parameters:
edit
 the node to visit Returns:
 If
true
is returned, the given node's child nodes will be visited next; however, iffalse
is returned, the given node's child nodes will not be visited.

visit
public boolean visit(ReplaceEdit edit)
Visits aReplaceEdit
instance. Parameters:
edit
 the node to visit Returns:
 If
true
is returned, the given node's child nodes will be visited next; however, iffalse
is returned, the given node's child nodes will not be visited.

visit
public boolean visit(UndoEdit edit)
Visits aUndoEdit
instance. Parameters:
edit
 the node to visit Returns:
 If
true
is returned, the given node's child nodes will be visited next; however, iffalse
is returned, the given node's child nodes will not be visited.

visit
public boolean visit(MultiTextEdit edit)
Visits aMultiTextEdit
instance. Parameters:
edit
 the node to visit Returns:
 If
true
is returned, the given node's child nodes will be visited next; however, iffalse
is returned, the given node's child nodes will not be visited.

