Bug 47597 - Code formatter ignores bracing preferences after static keyword
Summary: Code formatter ignores bracing preferences after static keyword
Status: RESOLVED DUPLICATE of bug 17349
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1.2   Edit
Hardware: PC Windows 2000
: P3 minor (vote)
Target Milestone: 3.0 M6   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-26 17:36 EST by Paul Ruskin CLA
Modified: 2003-11-27 05:20 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Ruskin CLA 2003-11-26 17:36:33 EST
With the code format preference "Insert New line before opening brace" selected 
when the following code is reformatted the brace after the static keyword is 
moved onto the same line as the keyword. eg:

public class Foo
{
    static
    {
        System.out.println("Hello world");
    }
}

is reformatted to:

public class Foo
{
    static {
        System.out.println("Hello world");
    }
}

The brace should have stayed on the next line.
Comment 1 Olivier Thomann CLA 2003-11-26 18:07:30 EST
This is a known defect and won't be fixed. The new formatter fixed it. It is
available in the 3.0 stream.
Comment 2 Olivier Thomann CLA 2003-11-26 18:11:29 EST
This is a duplicate of bug 17349.
Comment 3 Robert Aroney CLA 2003-11-27 00:56:28 EST
I noticed this same problem. I've just installed 3.0 M5 on an XP machine, and 
this is the first release of eclipse I have tried.
Comment 4 Philipe Mulet CLA 2003-11-27 05:20:30 EST

*** This bug has been marked as a duplicate of 17349 ***