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 110320

Summary: No formatting options for initializer blocks
Product: java Reporter: matthies <matthies>
Component: SourceAssignee: Dusan Balek <dbalek>
Status: NEW ---    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: ENHANCEMENT Exception Reporter:

Description matthies 2007-07-19 17:11:01 UTC
In Tools -> Options -> Java Code -> Formatting -> Blank Lines, there should be additional options for initializer 
blocks (static or non-static). Otherwise there's no way to specify how they should be separated from other class 
elements. Currently you end up with formatting like the following (no blank lines around initializer blocks):

    public class Test
    {
        public void f()
        {
            // whatever
        }
        {
            // instance initialization
        }
        static
        {
            // static initialization
        }
    }
Comment 1 Dusan Balek 2007-10-18 13:18:08 UTC
Formatting options for methods should be used now when formatting initializer blocks.

Checking in Reformatter.java;
/cvs/java/source/src/org/netbeans/modules/java/source/save/Reformatter.java,v  <--  Reformatter.java
new revision: 1.24; previous revision: 1.23
done

Marking as ENHANCEMENT.