This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Having enum TestEnum { A, B } and invoking 'Add default serialVersionUID' hint produces code with error -- missing semicolon, which leads to uncompilable code.
I would like to propose a small change in java.source API. For this issue and possibly also elsewhere, it would be nice to introduce a new method in org.netbeans.api.java.source.TreeUtilities to be able to recognize an Enum constant from tree. Similar methods are already present. Method signature: public boolean isEnumConstant(VariableTree tree) I'll attach diff.
Created attachment 86241 [details] Proposed API change
Strange description in apichanges.xml: "Added <code>TreeUtilities.isEnumConstant()</code> to return the TreeUtilities." Otherwise it seems OK to me.
API Change: http://hg.netbeans.org/jet-main/rev/6641456c9495 Fix of issue with enum: http://hg.netbeans.org/jet-main/rev/7a11c1ab04ef
Integrated into 'main-golden', will be available in build *200908210201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/6641456c9495 User: Max Sauer <msauer@netbeans.org> Log: #170373: Adding TreeUtilities.isEnumConstant()