diff options
author | Roel Spilker <r.spilker@gmail.com> | 2009-11-29 01:04:22 +0100 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2009-11-29 01:04:22 +0100 |
commit | 0b36718d20bf149b4bdd9b2be88bf68055311b9a (patch) | |
tree | f1de585b662f8b973832438aca6e562fa3b89f11 /src/delombok | |
parent | ffb78b6af6e4ba1426de1bcfc36f43521026e39e (diff) | |
download | lombok-0b36718d20bf149b4bdd9b2be88bf68055311b9a.tar.gz lombok-0b36718d20bf149b4bdd9b2be88bf68055311b9a.tar.bz2 lombok-0b36718d20bf149b4bdd9b2be88bf68055311b9a.zip |
Annotations on parameters should be inline
Diffstat (limited to 'src/delombok')
-rw-r--r-- | src/delombok/lombok/delombok/PrettyCommentsPrinter.java | 14 |
1 files changed, 11 insertions, 3 deletions
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<Comment> comments; private final JCCompilationUnit cu; private boolean newLine = true; - + private boolean inParams = false; + public PrettyCommentsPrinter(Writer out, JCCompilationUnit cu, List<Comment> comments) { this.out = out; this.comments = comments; @@ -370,8 +371,13 @@ public class PrettyCommentsPrinter extends JCTree.Visitor { public void printAnnotations(List<JCAnnotation> trees) throws IOException { for (List<JCAnnotation> 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 "); |