Community
Participate
Working Groups
Build ID: I20061102-1715 Adding a constant and a field to the following empty enum: enum E { } results in the field not indented correctly: enum E { MISSING; int MISSING; } The following code has been used to insert constant and a field: EnumDeclaration ed = (EnumDeclaration)cu.types().get(0); // add enum constant ListRewrite lrw = rewriter.getListRewrite(ed, EnumDeclaration.ENUM_CONSTANTS_PROPERTY); EnumConstantDeclaration newConstant = cu.getAST().newEnumConstantDeclaration(); lrw.insertLast(newConstant, null); // and field VariableDeclarationFragment newFragment = cu.getAST().newVariableDeclarationFragment(); FieldDeclaration newField = cu.getAST().newFieldDeclaration(newFragment); lrw = rewriter.getListRewrite(ed, ed.getBodyDeclarationsProperty()); lrw.insertLast(newField, null);
Created attachment 55136 [details] Test case illustrating the problem
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.