Bug 95580

Summary: CreateField on IType doesn't work if the type is an enum type that has enum constants
Product: [Eclipse Project] JDT Reporter: Olivier Thomann <Olivier_Thomann>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Apply on HEAD of org.eclipse.jdt.core.tests.model
none
Apply on HEAD none

Description Olivier Thomann CLA 2005-05-17 11:34:46 EDT
Using M7, this would lead to an IllegalArgumentException.
Try to add a field to an enum type that has enum constants.

I will attach a test case and a patch.
Comment 1 Olivier Thomann CLA 2005-05-17 11:36:00 EDT
Created attachment 21264 [details]
Apply on HEAD of org.eclipse.jdt.core.tests.model
Comment 2 Olivier Thomann CLA 2005-05-17 11:36:28 EDT
Created attachment 21265 [details]
Apply on HEAD
Comment 3 Olivier Thomann CLA 2005-05-24 23:27:02 EDT
Fixed and released in HEAD.
Regression test added in
org.eclipse.jdt.core.tests.model.CreateMembersTests.test005-006
Comment 4 Frederic Fusier CLA 2005-05-27 08:18:20 EDT
Verified for 3.1 RC1 with build I20050527-0010.