This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 51306 - Wrong formating of enums
Summary: Wrong formating of enums
Status: CLOSED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: issues@editor
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2004-11-09 13:05 UTC by cezariusz
Modified: 2007-11-05 13:39 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cezariusz 2004-11-09 13:05:21 UTC
Build 200410311900

Test case:

public class Test {
    public enum Colors {
      RED,
      GREEN,
      BLUE
    }
}

after reformat:

public class Test {
    public enum Colors {
      RED,
              GREEN,
              BLUE
    }
}
Comment 1 cezariusz 2004-11-09 13:28:52 UTC
I believe it's a regression introduced by the fix for the issue 
6065, thus P2.
Comment 2 cezariusz 2004-11-09 13:33:22 UTC
Looks like I've chosen a wrong component, reasigning to editor.
Comment 3 psuk 2004-11-09 18:59:12 UTC
Verified, it's a reproducible defect, although not a regression
against 3.6, as there was no support for enums.

As a workaround, you can switch it off by 
Options->Editing->Indentation Engines->Java Indentation Engine
set Statement Continuation Indent=0

Downgrading it to P3, using rules
http://qa.netbeans.org/processes/bug_priority_guidelines.html
Comment 4 cezariusz 2004-11-09 19:57:00 UTC
I meant it's a regression against earlier 4.0 builds.
Comment 5 Dusan Balek 2004-11-16 13:54:50 UTC
Fixed in [maintrunk].

Checking in libsrc/org/netbeans/editor/ext/java/JavaFormatSupport.java;
/cvs/editor/libsrc/org/netbeans/editor/ext/java/JavaFormatSupport.java,v
 <--  JavaFormatSupport.java
new revision: 1.37; previous revision: 1.36
done

Tests added.

Checking in
test/unit/src/org/netbeans/modules/editor/java/JavaFormatterUnitTest.java;
/cvs/editor/test/unit/src/org/netbeans/modules/editor/java/JavaFormatterUnitTest.java,v
 <--  JavaFormatterUnitTest.java
new revision: 1.5; previous revision: 1.4
done
Comment 6 cezariusz 2004-12-08 15:23:01 UTC
Verified in 200411231900.