Community
Participate
Working Groups
(3.1M4) We have the following enum type: public enum MyEnum { } Running the following code for this type, EnumDeclaration enumDecl = ... ; String name = "VALUE1"; EnumConstantDeclaration ecd = enumDecl.getAST().newEnumConstantDeclaration(); ecd.setName(ecd.getAST().newSimpleName(name)); ListRewrite lrw = rw.getListRewrite(enumDecl, EnumDeclaration.ENUM_CONSTANTS_PROPERTY); lrw.insertFirst(ecd, null); // actually, any insert... method and further rewriting the source code, we get the following result: public enum MyEnumVALUE1 { } which is different from the correct result. The rewriting is performed properly if there are one or more enum constants already present in the list.
fixed > 20050202
fix released
Verified in I20050214-0927