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.
Summary: | add "java platform" config item for and support for other than 1.5 platforms in code generation | ||
---|---|---|---|
Product: | uml | Reporter: | bugbridge <bugbridge> |
Component: | Code Generation | Assignee: | issues@uml <issues> |
Status: | NEW --- | ||
Severity: | blocker | ||
Priority: | P2 | ||
Version: | 5.x | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
bugbridge
2006-07-19 13:39:33 UTC
Review: This happens when the UML project is standalone, some enums are created, and then is associated to a Java 1.4 project, and Generate Code is invoked. If the UML project is assoc to the Java 1.4 project prior to having any enums, then enum creation is blocked. low use case not currently impacting our installed user base. Starting UML NB5.5 there isn't notion of associated Java Project. The codegen implemented in UML NB6.0 generates code according to Java 1.5 language spec. It'd look like a natural enhancement to : - add support for more Java-s than 1.5 - and in particular add "java platform" config item (which would be explicitly configured by user or implicitly figured out base on Java project, if any, owning the target generation directory) For this specific case - enums in pre1.5 java - current template-based codegen allows user to easily modify existing or add new template for an enumeration that would generate something like this: public class AnEnumClass { ... public static AnEnumClass AN_NTH_LITERAL = new AnEnumClass(<set of specific parameters, if any, for the literal>); ... } An automated implementation only for this specific case would have too much guessing: - (without generic implementation of config mentioned above) when to switch to 1.4 - what constructor, if any, with what specific parameters to use for a literal; thus anyway requiring in any non-trivial case the user's manual intervention that doesn't fall far from the manual template modification mentioned above. |