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.
Coke build 200604050200 Step to reproduce: - Create a uml project and associate it to the java project - Add Derivation classifier to the diagram and name it 'Class<Type>' - Add class to the diagram and name it 'MyClass' - Draw 'Navigable Aggregation' link from 'MyClass' to 'Class<Type>' element. 'Invalid Value' dialog pops up. - go to source code of 'MyClass' class. 'Class<Type> attr' attribute is not added to source code.
Steps to reproduce: - Create a Java-Platform Model UML project - Create a Class diagram - Add Derivation classifier to the diagram and name it 'Class<Type>' - Draw 'Navigable Aggregation' link from 'MyClass' to 'Class<Type>' element 'Invalid Value' dialog pops up - Generate Code for the UML project The generated source is: ------------------------------------------------------ package pack; public class MyClass { private Class<Type1> ; public MyClass() { } } ------------------------------------------------------ The name of attribute is missed. The source is not compiled: ------------------------------------------------------ UMLProject1Sources\src\pack\MyClass.java:4: <identifier> expected private Class<Type1> ; 1 error ------------------------------------------------------
First, the invalid name dialog is being show because of the angle brackets when it is trying to auto-gen a name for the attribute and its accessors, but this can be made smarter to remove the brackets or just consider chars prior to the first angle bracket. Second, we don't currently generate a class for derivation classifiers, but it looks like we should. Researching to figure what is the right thing to do.
Removing all instances of "<" and ">" before naming the attribute. Code gen did not need to be adjusted.
verified