Summary: | [formatter] Won't reformat a Java file with extra blank lines | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Michael Murphree <michael.murphree> |
Component: | Core | Assignee: | Frederic Fusier <frederic_fusier> |
Status: | VERIFIED INVALID | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | satyam.kandula |
Version: | 3.7 | ||
Target Milestone: | 3.7 M2 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Michael Murphree
2010-08-09 15:37:11 EDT
Once the extra blank lines are removed, the formatter will make the appropriate corrections. I'll investigate This is not a bug. This is due to the fact that the "Eclipse [built-in]" profile preserve 1 empty line by default. Hence, all blank lines you have in your sample a preserved by default and make the formatted code indentical than the original. To avoid this, just change the value of 'Number of empty lines to preserve' from 1 to 0. You'll find it on the "Blank lines" tab when creating or modifying a formatter profile from the "Java" > "Code Style" > "Formatter" preference page. As this is the expected behavior, close this bug as invalid. Thanks for the correction. That does what I was looking for. Perhaps we could add an "Ignore blank lines for brace placement option" at some point. (In reply to comment #4) > Thanks for the correction. That does what I was looking for. > > Perhaps we could add an "Ignore blank lines for brace placement option" at some > point. There are already many options -- don't want any more! Verified for 3.7M2 |