|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.text.edits.TextEditVisitor
A visitor for text edits.
For each different concrete text edit type
public boolean visit(T node)
- Visits the given edit to
perform some arbitrary operation. If true
is returned, the given edit's
child edits will be visited next; however, if false
is returned, the
given edit's child edits will not be visited. The default implementation provided by
this class calls a generic method visitNode(Testedit 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 type-specific
visit
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 type-specific
endVisit
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.
TextEdit.accept(TextEditVisitor)
Constructor Summary | |
---|---|
TextEditVisitor()
|
Method Summary | |
---|---|
void |
postVisit(TextEdit edit)
Visits the given text edit following the type-specific visit (after endVisit ).
|
void |
preVisit(TextEdit edit)
Visits the given text edit prior to the type-specific visit. |
boolean |
visit(CopyingRangeMarker edit)
Visits a CopyingRangeMarker instance. |
boolean |
visit(CopySourceEdit edit)
Visits a CopySourceEdit instance. |
boolean |
visit(CopyTargetEdit edit)
Visits a CopyTargetEdit instance. |
boolean |
visit(DeleteEdit edit)
Visits a DeleteEdit instance. |
boolean |
visit(InsertEdit edit)
Visits a InsertEdit instance. |
boolean |
visit(MoveSourceEdit edit)
Visits a MoveSourceEdit instance. |
boolean |
visit(MoveTargetEdit edit)
Visits a MoveTargetEdit instance. |
boolean |
visit(MultiTextEdit edit)
Visits a MultiTextEdit instance. |
boolean |
visit(RangeMarker edit)
Visits a RangeMarker instance. |
boolean |
visit(ReplaceEdit edit)
Visits a ReplaceEdit instance. |
boolean |
visit(UndoEdit edit)
Visits a UndoEdit instance. |
boolean |
visitNode(TextEdit edit)
Visits the given text edit. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TextEditVisitor()
Method Detail |
public void preVisit(TextEdit edit)
visit
).
The default implementation does nothing. Subclasses may reimplement.
edit
- the node to visitpublic void postVisit(TextEdit edit)
endVisit
).
The default implementation does nothing. Subclasses may reimplement.
edit
- the node to visitpublic boolean visitNode(TextEdit edit)
true
.
edit
- the node to visit
true
is returned, the given node's child
nodes will be visited next; however, if false
is
returned, the given node's child nodes will not be visited.public boolean visit(CopySourceEdit edit)
CopySourceEdit
instance.
edit
- the node to visit
true
is returned, the given node's child
nodes will be visited next; however, if false
is
returned, the given node's child nodes will not be visited.public boolean visit(CopyTargetEdit edit)
CopyTargetEdit
instance.
edit
- the node to visit
true
is returned, the given node's child
nodes will be visited next; however, if false
is
returned, the given node's child nodes will not be visited.public boolean visit(MoveSourceEdit edit)
MoveSourceEdit
instance.
edit
- the node to visit
true
is returned, the given node's child
nodes will be visited next; however, if false
is
returned, the given node's child nodes will not be visited.public boolean visit(MoveTargetEdit edit)
MoveTargetEdit
instance.
edit
- the node to visit
true
is returned, the given node's child
nodes will be visited next; however, if false
is
returned, the given node's child nodes will not be visited.public boolean visit(RangeMarker edit)
RangeMarker
instance.
edit
- the node to visit
true
is returned, the given node's child
nodes will be visited next; however, if false
is
returned, the given node's child nodes will not be visited.public boolean visit(CopyingRangeMarker edit)
CopyingRangeMarker
instance.
edit
- the node to visit
true
is returned, the given node's child
nodes will be visited next; however, if false
is
returned, the given node's child nodes will not be visited.public boolean visit(DeleteEdit edit)
DeleteEdit
instance.
edit
- the node to visit
true
is returned, the given node's child
nodes will be visited next; however, if false
is
returned, the given node's child nodes will not be visited.public boolean visit(InsertEdit edit)
InsertEdit
instance.
edit
- the node to visit
true
is returned, the given node's child
nodes will be visited next; however, if false
is
returned, the given node's child nodes will not be visited.public boolean visit(ReplaceEdit edit)
ReplaceEdit
instance.
edit
- the node to visit
true
is returned, the given node's child
nodes will be visited next; however, if false
is
returned, the given node's child nodes will not be visited.public boolean visit(UndoEdit edit)
UndoEdit
instance.
edit
- the node to visit
true
is returned, the given node's child
nodes will be visited next; however, if false
is
returned, the given node's child nodes will not be visited.public boolean visit(MultiTextEdit edit)
MultiTextEdit
instance.
edit
- the node to visit
true
is returned, the given node's child
nodes will be visited next; however, if false
is
returned, the given node's child nodes will not be visited.
|
Eclipse Platform Release 3.1 |
|||||||||||
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, 2005. All rights reserved.