Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 200015

Summary: [5.0][typing] Automatically close bracket broken with enums
Product: [Eclipse Project] JDT Reporter: Martin Aeschlimann <martinae>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, peter
Version: 3.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Martin Aeschlimann CLA 2007-08-15 06:29:47 EDT
3.4

In the following code, I want to enter a enum constant body:
After pressing enter after the opening bracket 'test1 {|here', the comma should not go into the body.
before:
enum TestEnum {
	test1 {,
	test2;
	public abstract boolean getsomethin();
}

after:
enum TestEnum {
	test1 {
		,
	}
	test2;
	public abstract boolean getsomethin();
}
should be:
enum TestEnum {
	test1 {
		
	},
	test2;
	public abstract boolean getsomethin();
}
Comment 1 Peter Mularien CLA 2007-09-06 13:46:53 EDT
I can confirm this bug in Eclipse 3.3 I20070625-1500. This isn't exclusive to the , - the same problem will occur with the semicolon at the end of the enum values. As an aside, changing the "Enum constant body" setting in Code Style - Formatter to any of the 4 available values has no effect on this bug.
Comment 2 Dani Megert CLA 2012-11-28 08:31:14 EST

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