Community
Participate
Working Groups
Newly added enum constants seem to be always separated by a comma with a following space. For example, if I would like to add a constant with a Javadoc to an existing list of enum constants, I am getting the output like this: enum E { /** * javadoc 1 */ ENUM_CONST_1, /** * javadoc 2 */ ENUM_CONST_2; } Would it be possible to use logic similar to adding body declarations? E.g. determine separating new lines based on either existing constants or, if they do not exist, use DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ENUM_CONSTANTS? The ", " string is hardcoded on line 3029 in ASTRewriteAnalyzer, method visit(EnumConstantDeclaration node). This value seems to be used later without modifications in the inner class ListRewriter...
I have a fix ready, but I have troubles with formatting the enum constants: see bug 184485
for 3.4 as this is more a presentation issue, no wrong code generated.
Deferring post 3.4 as we ran out of time
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.