Community
Participate
Working Groups
Using 3.4.0 Formatting the following simple test case: public class X { /** * @see java.lang.String * * Formatter should keep empty line above */ void foo() { } } I get the following output: public class X { /** * @see java.lang.String Formatter should keep empty line above */ void foo() { } } Which is obviously incorrect. This output should only be produced if the 'Remove blank lines' preference was set in the 'Comment' tab...
(In reply to comment #0) > Which is obviously incorrect. This output should only be produced if the > 'Remove blank lines' preference was set in the 'Comment' tab... If this option is set, the output should be: public class X { /** * @see java.lang.String * Formatter should keep empty line above */ void foo() { } } and not: public class X { /** * @see java.lang.String Formatter should keep empty line above */ void foo() { } }
(In reply to comment #1) Theoretically yes, but due to bug 96696 it would behave like I described (i.e. concatenating lines). Currently the formatter does not preserve existing line breaks, neither in comments (bug 96696) nor in code (bug 198074). I think we need to think about a global solution which would solve all these bugs in one shot...
Created attachment 119368 [details] Proposed patch This patch also includes fix for bug 198074 as there's only one preference to preserve existing line break...
*** Bug 96696 has been marked as a duplicate of this bug. ***
*** Bug 196124 has been marked as a duplicate of this bug. ***
Created attachment 119490 [details] Updated patch on top of fix for bug 256799
Created attachment 119523 [details] Last proposed patch This last patch includes an expected change in an existing test...
Released for 3.5M4 in HEAD stream.
Verified for 3.5M4 using I20081209-0100