Bug 317784

Summary: Java Formatter / New Lines / Annotations / have an option to distinguish member variables and methods
Product: [Eclipse Project] JDT Reporter: michael.t
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3 CC: michael.t, Olivier_Thomann
Version: 3.6   
Target Milestone: 3.7 M2   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:

Description michael.t CLA 2010-06-24 04:25:15 EDT
In the current implementation of the formatter, you can't have different rules for new lines insertion after annotations on member variables and methods.
There is just a "Insert new line after annotations on members" options which encompass both member variables and methods.

We use annotation for a GUI framework and I would like the formatter to format this way:

Class SomeGUI
{
    @FormComponent JLabel nameLbl;
    @FormComponent JTextField nameTxt;
    
    
    @FormEvent
    private void nameChanged()
    {
        doSomethingUsefull();
    }
    
    [...]
}

So fields (member variables) on the same line, but insert a new line for annotation on methods.
I'm willing to contribute if someone give me a pointer to get me started.

-- Configuration Details --
Product: Eclipse 1.3.0.20100617-0521 (org.eclipse.epp.package.jee.product)
Installed Features:
 org.eclipse.jdt 3.6.0.v20100526-0800-7z8XFUJFMTfCWGoVuHImpms9H155
Comment 1 michael.t CLA 2010-06-24 08:36:59 EDT

*** This bug has been marked as a duplicate of bug 308000 ***
Comment 2 Olivier Thomann CLA 2011-01-25 11:15:45 EST
Verified.