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.
Build 2006.02.15 Java SDK: 1.5.0_06 When one creates a class diagram with a class linked to code, changing anything in the documentation for the method resets the return line to a default value. Steps to reproduce: 1. Create a new Java Application Project, leave create main class checked 2. Create a new UML Project by reverse engineering a Java Project, select the project from 1 3. Modify the main method of the Main.java to return an int (I have also confirmed this behavior with a String) 4. Enter “return 3” into the class 5. Go to the UML Project, open up model, right click on the Main class and select Create Diagram from selected elements, then select Class Diagram 7. Click on the main method of the Main class and type something into the documentation window Actual Result: “Return 3” has become “return 0”, comment changed correctly Expected action: Method should only have its comment changed. The internal code should remain untouched.
I'm able to reproduce this problem.
There is no more live round-trip feature but the same issue still exists in the manually generated code. Changed subcomponent to "code generation".
upgrade to P2
Since we no longer have live round trip, (nor do we have source merging) we longer have any way to determine what the method body looked like before generating code. Bascially we always generate new code. In the next release we hope to put the source merging feature back into the tool.
verified