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 - No formatting options for initializer blocks
Summary: No formatting options for initializer blocks
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-19 17:11 UTC by matthies
Modified: 2007-10-18 13:18 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

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