Bug 317784 - Java Formatter / New Lines / Annotations / have an option to distinguish member variables and methods
Summary: Java Formatter / New Lines / Annotations / have an option to distinguish memb...
Status: VERIFIED DUPLICATE of bug 308000
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.6   Edit
Hardware: Macintosh Mac OS X
: P3 enhancement (vote)
Target Milestone: 3.7 M2   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-24 04:25 EDT by michael.t CLA
Modified: 2011-01-25 11:15 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.