Bug 95580 - CreateField on IType doesn't work if the type is an enum type that has enum constants
Summary: CreateField on IType doesn't work if the type is an enum type that has enum c...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 RC1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-17 11:34 EDT by Olivier Thomann CLA
Modified: 2005-05-27 08:18 EDT (History)
0 users

See Also:


Attachments
Apply on HEAD of org.eclipse.jdt.core.tests.model (3.55 KB, patch)
2005-05-17 11:36 EDT, Olivier Thomann CLA
no flags Details | Diff
Apply on HEAD (1.60 KB, patch)
2005-05-17 11:36 EDT, Olivier Thomann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.