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.

Bug 73200 - Commenting a method in a UML class diagram destroys the return line in the Java code
Summary: Commenting a method in a UML class diagram destroys the return line in the Ja...
Status: VERIFIED WONTFIX
Alias: None
Product: uml
Classification: Unclassified
Component: Code Generation (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Trey Spiva
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-03 07:52 UTC by claubach
Modified: 2007-06-19 13:43 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description claubach 2006-03-03 07:52:49 UTC
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.
Comment 1 Peter Lam 2006-06-07 09:06:35 UTC
I'm able to reproduce this problem.
Comment 2 Peter Lam 2007-01-25 21:37:24 UTC
There is no more live round-trip feature but the same issue still exists in the
manually generated code. Changed subcomponent to "code generation".
Comment 3 Peter Lam 2007-01-26 18:19:43 UTC
upgrade to P2
Comment 4 Trey Spiva 2007-01-30 22:54:11 UTC
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.
Comment 5 Alexandr Scherbatiy 2007-06-19 13:43:16 UTC
verified