From 0b36718d20bf149b4bdd9b2be88bf68055311b9a Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Sun, 29 Nov 2009 01:04:22 +0100 Subject: Annotations on parameters should be inline --- src/delombok/lombok/delombok/PrettyCommentsPrinter.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/delombok') diff --git a/src/delombok/lombok/delombok/PrettyCommentsPrinter.java b/src/delombok/lombok/delombok/PrettyCommentsPrinter.java index 785826f1..f1ba0adf 100644 --- a/src/delombok/lombok/delombok/PrettyCommentsPrinter.java +++ b/src/delombok/lombok/delombok/PrettyCommentsPrinter.java @@ -154,7 +154,8 @@ public class PrettyCommentsPrinter extends JCTree.Visitor { private List comments; private final JCCompilationUnit cu; private boolean newLine = true; - + private boolean inParams = false; + public PrettyCommentsPrinter(Writer out, JCCompilationUnit cu, List comments) { this.out = out; this.comments = comments; @@ -370,8 +371,13 @@ public class PrettyCommentsPrinter extends JCTree.Visitor { public void printAnnotations(List trees) throws IOException { for (List l = trees; l.nonEmpty(); l = l.tail) { printStat(l.head); - println(); - align(); + if (inParams) { + print(" "); + } + else { + println(); + align(); + } } } @@ -605,7 +611,9 @@ public class PrettyCommentsPrinter extends JCTree.Visitor { print(" " + tree.name); } print("("); + inParams = true; printExprs(tree.params); + inParams = false; print(")"); if (tree.thrown.nonEmpty()) { print(" throws "); -- cgit