Bug 17349 - Code Formatter incorrectly formats static initializer
Summary: Code Formatter incorrectly formats static initializer
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows All
: P3 normal (vote)
Target Milestone: 3.0 M4   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 22336 37422 47597 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-05-23 11:14 EDT by Joerg Gambihler CLA
Modified: 2003-11-27 05:20 EST (History)
3 users (show)

See Also:


Attachments
Proposal for pst 2.0 (87.07 KB, patch)
2002-05-23 12:20 EDT, Olivier Thomann CLA
no flags Details | Diff
Zipped file containing a proposal for post 2.0 (17.05 KB, application/zip)
2002-05-23 12:22 EDT, Olivier Thomann CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joerg Gambihler CLA 2002-05-23 11:14:02 EDT
Code Formatter doesn't obey "Insert new line before an opening brace" option.

Steps:
1. activate "Insert new line before an opening brace" in 
preferences.Java.CodeFormatter
2. invoke Edit:Format on a class with static initializer.

Result:
class Foo
{
    static {
        ...
    }
    ....
}
Comment 1 Philipe Mulet CLA 2002-05-23 11:54:12 EDT
Will consider post 2.0.
Comment 2 Olivier Thomann CLA 2002-05-23 12:20:49 EDT
Created attachment 1003 [details]
Proposal for pst 2.0
Comment 3 Olivier Thomann CLA 2002-05-23 12:22:12 EDT
Created attachment 1004 [details]
Zipped file containing a proposal for post 2.0
Comment 4 Olivier Thomann CLA 2002-05-23 12:22:46 EDT
Sorry the first attachement is completely useless. Bugzilla lost all the formatting of the 
source file.
Comment 5 Philipe Mulet CLA 2002-07-25 06:30:46 EDT
Resurrecting formatter issues in 2.1 stream.
Comment 6 Philipe Mulet CLA 2002-07-25 06:32:36 EDT
Clearing resolution
Comment 7 Olivier Thomann CLA 2002-11-05 16:52:32 EST
*** Bug 22336 has been marked as a duplicate of this bug. ***
Comment 8 Olivier Thomann CLA 2003-01-15 13:22:35 EST
We need to clear 2.1 bug reports that won't be addressed before 2.1. The new 
implementation is still in the works. Therefore we cannot include it for 2.1. 
Not enough testing and we need to polish the preferences. This will be address 
for 2.2 as stated in the JDT/Core plan.
Comment 9 Olivier Thomann CLA 2003-05-12 10:56:31 EDT
*** Bug 37422 has been marked as a duplicate of this bug. ***
Comment 10 Philipe Mulet CLA 2003-06-12 06:36:04 EDT
Resurrecting for 3.0
Comment 11 Olivier Thomann CLA 2003-06-12 15:58:57 EDT
Reopen for 3.0 consideration.
Comment 12 Olivier Thomann CLA 2003-10-03 09:55:54 EDT
This is addressed in the new formatter.
Fixed and released in HEAD.
Regression test added.
Comment 13 David Audel CLA 2003-10-13 10:23:12 EDT
Verified.
Comment 14 Philipe Mulet CLA 2003-11-27 05:20:31 EST
*** Bug 47597 has been marked as a duplicate of this bug. ***