Bug 76642 - Inner Enum Declarations not formatted
Summary: Inner Enum Declarations not formatted
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M3   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-20 05:24 EDT by Martin Aeschlimann CLA
Modified: 2004-11-03 12:17 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 Martin Aeschlimann CLA 2004-10-20 05:24:10 EDT
20041020

The following code can not be formatted (null returned as resulting edit)
Not sure if 1.5 really allows inner enums, but I would guess it does.

public class Test {
    public enum MyInnerEnum {
        A, B
    }
}
Comment 1 Philipe Mulet CLA 2004-10-20 07:09:04 EDT
Member enums are ok. Local ones are not.
Comment 2 Olivier Thomann CLA 2004-10-20 14:26:46 EDT
It is working for me.
Comment 3 Martin Aeschlimann CLA 2004-10-21 13:53:42 EDT
Just tried again, does not work for me.
An example is the code sample for the code formatter's 'New Lines' preview. 
Currently changing the settings there do not change the preview.
Comment 4 Olivier Thomann CLA 2004-10-21 13:55:11 EDT
Are you sure that you are using the 1.5 mode?
Comment 5 Olivier Thomann CLA 2004-10-21 14:05:19 EDT
I will investigate.
Comment 6 Martin Aeschlimann CLA 2004-10-21 14:07:11 EDT
yes, I'm in 1.5 mode (note that there are other 1.5 preview code samples in 
the code fomatter that work)
Comment 7 Olivier Thomann CLA 2004-10-21 14:17:06 EDT
I reproduced the problem using the source code in the New Lines view. The code
doesn't look like the test case you provided. I am investigating the failure.
Should be fixed today.
Comment 8 Olivier Thomann CLA 2004-10-21 14:39:45 EDT
Fixed and released in HEAD.
Regression test added.
Comment 9 Olivier Thomann CLA 2004-10-21 14:45:53 EDT
See bug 76766 for remaining problems with empty body in enum declaration and
enum constant.
Comment 10 David Audel CLA 2004-11-03 12:17:36 EST
Verified for 3.1M3 with build I20041102