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.
When an Enumeration element's code is generated, the literals are not generated properly. Example: public enum EngineType { 4bangerStraight6V6V8V10V12; public void getEngineType() { } }
Look inside ExportCodeTask class to see how the NBEventProcessor is invoked to generate the code. A simple debug trace staring with exportCode method on a sample Enumeration with a few literals should reveal the root cause very quickly.
It appears that the enumeration is being created just fine now. Not sure what changed to make this work. Just a couple more questions about other possibilities for Enumeration code gen before closing this.
I fixed this, but I am not thrilled with the implementation. I would like to revisit during FCS to create an enumLiteralsAdded (note the "s" as in plural) just like I did for operationsAdded and attributesAdded. This is for performance reasons. Only one JavaModel tx/source save. But it works, and attributes and methods are generated properly as well. Do not bother testing a Nested enum (ex - Enumeration nested in a Class) because code gen doesn't work for nested classes either and there is already an issue open for this: 87373
verified with all-nbms-griffin-061018_27.zip nbms