diff options
author | Sergey Prigogin | 2012-02-04 02:32:59 +0000 |
---|---|---|
committer | Sergey Prigogin | 2012-02-04 02:32:59 +0000 |
commit | fa13b42c51a646487bb29aa5b353914606223cc3 (patch) | |
tree | af687db0747ae828e42fd1a67bc705c66fcf34f2 /core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter | |
parent | 0d4d66ec6e22720d9e567944293b8f05ca008be0 (diff) | |
download | org.eclipse.cdt-fa13b42c51a646487bb29aa5b353914606223cc3.tar.gz org.eclipse.cdt-fa13b42c51a646487bb29aa5b353914606223cc3.tar.xz org.eclipse.cdt-fa13b42c51a646487bb29aa5b353914606223cc3.zip |
New UI and other improvements for Extract Function refactoring .
Diffstat (limited to 'core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter')
2 files changed, 9 insertions, 6 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/ASTWriter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/ASTWriter.java index 83dd18fdf43..f9992e2c681 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/ASTWriter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/ASTWriter.java @@ -39,7 +39,7 @@ import org.eclipse.cdt.internal.core.dom.rewrite.commenthandler.NodeCommentMap; * @author Emanuel Graf */ public class ASTWriter { - private ASTModificationStore modificationStore = new ASTModificationStore(); + private final ASTModificationStore modificationStore = new ASTModificationStore(); /** * Creates a <code>ASTWriter</code>. @@ -63,7 +63,7 @@ public class ASTWriter { * Generates the source code representing this node including comments. * * @param rootNode Node to write. - * @param commentMap Node Comment Map <code>ASTCommenter</code> + * @param commentMap comments for the translation unit * @return A <code>String</code> representing the source code for the node. * @throws ProblemRuntimeException if the node or one of it's children is * an <code>IASTProblemNode</code>. @@ -79,10 +79,6 @@ public class ASTWriter { return writer.toString(); } - public void setModificationStore(ASTModificationStore modificationStore) { - this.modificationStore = modificationStore; - } - /** * Returns <code>true</code> if the node should be separated by a blank line from the node * before it. diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/ASTWriterVisitor.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/ASTWriterVisitor.java index cd1e5c363d9..ef08a0ba868 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/ASTWriterVisitor.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/ASTWriterVisitor.java @@ -80,6 +80,13 @@ public class ASTWriterVisitor extends ASTVisitor { shouldVisitTypeIds = true; } + /** + * Creates a writer with an empty comment map. + */ + public ASTWriterVisitor() { + this(new NodeCommentMap()); + } + public ASTWriterVisitor(NodeCommentMap commentMap) { super(); init(commentMap); |