diff options
Diffstat (limited to 'core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/DeclarationWriter.java')
-rw-r--r-- | core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/DeclarationWriter.java | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/DeclarationWriter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/DeclarationWriter.java index 41ed66fc643..29e21800a75 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/DeclarationWriter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/DeclarationWriter.java @@ -98,17 +98,12 @@ public class DeclarationWriter extends NodeWriter { writeVisibilityLabel((ICPPASTVisibilityLabel) declaration); } - if (hasTrailingComments(declaration)) { - writeTrailingComments(declaration, false); - } - if (addNewLine) { - scribe.newLine(); - } + writeTrailingComments(declaration, addNewLine); if (hasFreestandingComments(declaration)) { if (declaration instanceof IASTFunctionDefinition) { scribe.newLine(); } - writeFreeStandingComments(declaration); + writeFreestandingComments(declaration); } } @@ -186,7 +181,7 @@ public class DeclarationWriter extends NodeWriter { scribe.newLine(2); writeDeclarationsInNamespace(namespaceDefinition, namespaceDefinition.getDeclarations()); if (hasFreestandingComments(namespaceDefinition)) { - writeFreeStandingComments(namespaceDefinition); + writeFreestandingComments(namespaceDefinition); } scribe.newLine(); scribe.print('}'); |