Example usage for Java org.eclipse.jdt.core.dom.rewrite ASTRewrite fields, constructors, methods, implement or subclass
The text is from its open source code.
ASTRewrite(AST ast) Internal constructor. |
ASTRewrite | create(AST ast) Creates a new instance for describing manipulations of the given AST. |
ASTNode | createCopyTarget(ASTNode node) Creates and returns a placeholder node for a true copy of the given node. |
ASTNode | createMoveTarget(ASTNode node) Creates and returns a placeholder node for the new locations of the given node. |
ASTNode | createStringPlaceholder(String code, int nodeType) Creates and returns a placeholder node for a source string that is to be inserted into the output document at the position corresponding to the placeholder. |
Object | get(ASTNode node, StructuralPropertyDescriptor property) Returns the value of the given property as managed by this rewriter. |
AST | getAST() Returns the AST the rewrite was set up on. |
ListRewrite | getListRewrite(ASTNode node, ChildListPropertyDescriptor property) Creates and returns a new rewriter for describing modifications to the given list property of the given node. |
void | remove(ASTNode node, TextEditGroup editGroup) Removes the given node from its parent in this rewriter. |
void | replace(ASTNode node, ASTNode replacement, TextEditGroup editGroup) Replaces the given node in this rewriter. |
TextEdit | rewriteAST(IDocument document, Map options) Converts all modifications recorded by this rewriter into an object representing the corresponding text edits to the given document containing the original source code. |
TextEdit | rewriteAST() Converts all modifications recorded by this rewriter into an object representing the the corresponding text edits to the source of a ITypeRoot from which the AST was created from. |
void | set(ASTNode node, StructuralPropertyDescriptor property, Object value, TextEditGroup editGroup) Sets the given property of the given node. |
void | setTargetSourceRangeComputer(TargetSourceRangeComputer computer) Sets a custom target source range computer for this AST rewriter. |
String | toString() Returns a string suitable for debugging purposes (only). |
ITrackedNodePosition | track(ASTNode node) Returns an object that tracks the source range of the given node across the rewrite to its AST. |