History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEA-19408
Type: Usability Problem Usability Problem
Status: Open Open
Assignee: Olesya Smirnova
Reporter: Peter Lawrey
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
IDEA: Feedback

Methods in Enums.

Created: 02 Sep 08 13:23   Updated: 02 Sep 08 13:30
Component/s: Code Formatting and Code Style

Build: 8,733
Severity: Low


 Description  « Hide
How do I specify that I want a newline before public and between }} This does not appear to be the default.
public enum Wrapping {
    WRAPPING {public boolean flag1() {
        return false;
    }public boolean flag2() {
        return false;
    }public boolean flag3() {
        return false;
    }public boolean flag4() {
        return false;
    }}
}


 All   Comments   Work Log   Change History      Sort Order:
Peter Lawrey - 02 Sep 08 13:28
If not a newline a space between }public would be better.
Additionally, it would be nice if the formatting for methods in the Class (Wrapping) could match those in the enum constant (WRAPPING)

Peter Lawrey - 02 Sep 08 13:30
If I turn on "Simple methods in one line" "Simple blocks in one line" then do Shift+Ctrl+J all the line together and reformat I get the following.
public enum Wrapping {
    WAPPING {public boolean flag1() { return false; }public boolean flag2() { return false; }public boolean flag3() {
        return false;
    }public boolean flag4() { return false; }}
}