## org.eclipse.emf.codegen.merge.java.facade.ast
Class ASTJCompilationUnit.NodeContentsReplacer

    java.lang.Object
      org.eclipse.emf.codegen.merge.java.facade.ast.ASTJCompilationUnit.AbstractRewriter
          org.eclipse.emf.codegen.merge.java.facade.ast.ASTJCompilationUnit.NodeContentsReplacer

Enclosing class:
  ASTJCompilationUnit

    protected class ASTJCompilationUnit.NodeContentsReplacer

extends ASTJCompilationUnit.AbstractRewriter

Field Summary
`protected java.util.Map<org.eclipse.jdt.core.dom.rewrite.ITrackedNodePosition,java.lang.String>` `trackedNodePositionsMap`

Constructor Summary
`ASTJCompilationUnit.NodeContentsReplacer()` Enables tracking for all nodes in tracked contents map (`ASTJCompilationUnit.getAllTrackedContentsMap()`).

Method Summary
`protected TextEdit` `addEdits(TextEdit existingEdits, IDocument doc)` Creates a `TextEdit` that replaces contents of all tracked nodes.

Methods inherited from class org.eclipse.emf.codegen.merge.java.facade.ast.ASTJCompilationUnit.AbstractRewriter
`createEdits`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### trackedNodePositionsMap

    protected java.util.Map<org.eclipse.jdt.core.dom.rewrite.ITrackedNodePosition,java.lang.String> trackedNodePositionsMap

Constructor Detail

### ASTJCompilationUnit.NodeContentsReplacer

    public ASTJCompilationUnit.NodeContentsReplacer()

  Enables tracking for all nodes in tracked contents map (`ASTJCompilationUnit.getAllTrackedContentsMap()`).

  This constructor must be called before call to `ASTRewrite.rewriteAST()` or `ASTRewrite.rewriteAST(IDocument, Map)`.

  See Also:
    `ASTRewrite.track(ASTNode)`

Method Detail

### addEdits

    protected TextEdit addEdits(TextEdit existingEdits,
                                IDocument doc)

  Creates a `TextEdit` that replaces contents of all tracked nodes.

  Specified by:
    `addEdits` in class `ASTJCompilationUnit.AbstractRewriter`
  Parameters:
    `existingEdits` - existing edits on
    `doc` - document after call to `ASTRewrite.rewriteAST()` or `ASTRewrite.rewriteAST(IDocument, Map)`.
  Returns:
    existingEdits with new edits added
  See Also:
    `trackedNodePositionsMap`

Copyright 2001-2006 IBM Corporation and others. All Rights Reserved.