Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 102590 - [quick fix] Abstract methods in enums
Summary: [quick fix] Abstract methods in enums
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M2   Edit
Assignee: Martin Aeschlimann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 128624 144116 222694 (view as bug list)
Depends on: 200016 200026
Blocks:
  Show dependency tree
 
Reported: 2005-07-03 12:19 EDT by David Barri CLA
Modified: 2008-03-14 04:52 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Barri CLA 2005-07-03 12:19:49 EDT
This is similar to bug #88970.
Please observe the following code.

enum TestEnum {
	test1,test2;
	public abstract boolean getsomethin();
}

There should be a quick-fix to add implementations of the abstact method and
produce the following code:

enum TestEnum {
	test1 {
		public boolean getsomethin() {
			// TODO: Insert code here
		}
	},
	test2 {
		public boolean getsomethin() {
			// TODO: Insert code here
		}
	},
	;
	public abstract boolean getsomethin();
}
Comment 1 Olivier Thomann CLA 2005-07-03 15:06:34 EDT
Move to JDT/UI
Comment 2 Dirk Baeumer CLA 2005-07-04 10:01:24 EDT
Even is code like this

enum TestEnum {
	test1 {
	}, test2 {
	};
	public abstract boolean getsomethin();
}

the two error icons don't offer a quick fix to add getSomething. Source action
works, code assist (e.g. type getS<code assist>) doesn't work.
Comment 3 Martin Aeschlimann CLA 2006-05-29 16:00:13 EDT
*** Bug 144116 has been marked as a duplicate of this bug. ***
Comment 4 Martin Aeschlimann CLA 2007-03-22 06:07:35 EDT

*** This bug has been marked as a duplicate of bug 88970 ***
Comment 5 Martin Aeschlimann CLA 2007-03-22 07:16:13 EDT
not a dup of 88970
Comment 6 Martin Aeschlimann CLA 2007-03-22 07:17:07 EDT
*** Bug 128624 has been marked as a duplicate of this bug. ***
Comment 7 Martin Aeschlimann CLA 2007-06-08 06:59:11 EDT
*** Bug 123241 has been marked as a duplicate of this bug. ***
Comment 8 Martin Aeschlimann CLA 2007-08-15 08:56:22 EDT
I filed bug 200016 and bug 200026 for the (IMO) strange error locations.
Comment 9 Martin Aeschlimann CLA 2007-08-16 06:45:00 EDT
quick fixes added > 20070816
Comment 10 Dani Megert CLA 2007-09-18 06:44:22 EDT
Verified in I20070918-0010.
Comment 11 Martin Aeschlimann CLA 2008-03-14 04:52:19 EDT
*** Bug 222694 has been marked as a duplicate of this bug. ***