Bug 47918

Summary: New code Formatter
Product: [Eclipse Project] JDT Reporter: Steve Ray <stephen.l.ray>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0   
Target Milestone: 3.0 M6   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Steve Ray CLA 2003-12-02 15:26:19 EST
I have blank lines between methods.  If my method ends with a curly brace it 
leaves the blank line if it ends with a commented curly brace it removes the 
blank line.

e.g.:    } // end constuctor
Comment 1 Olivier Thomann CLA 2003-12-03 10:04:48 EST
What are your formatting options?
Comment 2 Olivier Thomann CLA 2003-12-03 13:44:39 EST
Reproduced. I am investigating.
Comment 3 Olivier Thomann CLA 2003-12-03 14:11:49 EST
Fixed and released in HEAD. Regression tests added.

Test case:
class Example {
    void foo() {}

    void foo2() {} // end of foo2

    void bar() {}
}

New result if at least one blank lines needs to be preserved:
class Example {
    void foo() {
    }

    void foo2() {
    } // end of foo2

    void bar() {
    }
}

Using the new code formatter preference page, you can also add a new line 
before each method without specifying any number of blank lines to be 
preserved.
Comment 4 David Audel CLA 2003-12-17 06:22:56 EST
Verified for 3.0M6