protected class ASTJCompilationUnit.NodeContentsReplacer extends ASTJCompilationUnit.AbstractRewriter
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<ITrackedNodePosition,java.lang.String> |
trackedNodePositionsMap |
Constructor and Description |
---|
ASTJCompilationUnit.NodeContentsReplacer()
Enables tracking for all nodes in tracked contents map (
ASTJCompilationUnit.getAllTrackedContentsMap() ). |
Modifier and Type | Method and Description |
---|---|
protected TextEdit |
addEdits(TextEdit existingEdits,
IDocument doc)
Creates a
TextEdit that replaces contents of all tracked nodes. |
createEdits
protected java.util.Map<ITrackedNodePosition,java.lang.String> trackedNodePositionsMap
public ASTJCompilationUnit.NodeContentsReplacer()
ASTJCompilationUnit.getAllTrackedContentsMap()
).
This constructor must be called before call to ASTRewrite#rewriteAST()
or ASTRewrite#rewriteAST(IDocument, Map)
.
ASTRewrite#track(ASTNode)
protected TextEdit addEdits(TextEdit existingEdits, IDocument doc)
TextEdit
that replaces contents of all tracked nodes.addEdits
in class ASTJCompilationUnit.AbstractRewriter
existingEdits
- existing edits ondoc
- document after call to ASTRewrite#rewriteAST()
or ASTRewrite#rewriteAST(IDocument, Map)
.trackedNodePositionsMap