Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 78474 - Change an attribute type in source from one object to another - diagram is not updated
Change an attribute type in source from one object to another - diagram is no...
Product: uml
Classification: Unclassified
Component: Diagram Class
PC Windows XP
: P1 (vote)
Assigned To: Craig Conover
: 80567 (view as bug list)
Depends on:
Blocks: 78483
  Show dependency treegraph
Reported: 2006-06-20 10:09 UTC by bugbridge
Modified: 2006-09-20 00:58 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description bugbridge 2006-06-20 10:09:05 UTC
If you change the attribute type (in source code with roundtrip in place) from
one type of object to another, the association link in the diagram is not moved
from the old object element to the new one. The node properties are not
refreshed right away either. Closing and opening the IDE will fix the tree node
display and property display, but the diagram still shows the old association
link to the old class. Even clicking on the link in the diagram shows that the
properties are correct (in sync with source code), but the displayed link is not.

Reproduction Steps:
1) Create a new Java project with no sources
2) Create a new UML project by Reverse Engineering the new Java project
3) Create a Class diagram
4) Add three new classes named MyClass, ClassA and ClassB
5) In the Java project, in the MyClass source editor, add a new attribute
(ClassA foo):    
	private ClassA foo;
A navigable association should be automatically display between MyClass and
ClassA elements
7) In the Java source editor for MyClass, change the type for the "foo"
attribute from ClassA to ClassB - notice that nothing changes. The link should
have been moved from ClassA to ClassB. If none of the UML project tree nodes are
expanded, then expanding the MyClass node branches should reveal the correct
Association links when checked in the Property window - basically confirming
that there should be an Association link between MyClass and ClassB and none
between MyClass and ClassA.
8) Close the IDE and restart. Open the diagram. Notice the diagram still shows
the association from MyClass to ClassA. 
9) Click on the assocation link that connects MyClass and ClassA. Look at the
Property window and confirm that the properties do in fact show that the
association link should be between MyClass and ClassB not Class A, but the
diagram still reflects the MyClass to ClassA link. ????

Two issues to be solved:
a) diagram should reflect the correct link relationship
b) tree nodes should be refreshed with the correct information - if the
Association tree nodes were already expanded before the attribute type change,
then they would not be updated untilt he IDE is restarted.

Delete the source class (source of the link) element in question  from the
diagram, but don't permanently delete the element from the project.

Then add them it back to the diagram. Link will be drawn to the proper
associated class.
Comment 1 Craig Conover 2006-08-14 20:17:34 UTC
Changed subcomponent from "synch" to "diagram class" because the code synch is
actually working fine. It's a class diagram refresh issue.
Comment 2 Craig Conover 2006-08-14 20:18:21 UTC
*** Issue 80567 has been marked as a duplicate of this issue. ***
Comment 3 Craig Conover 2006-09-20 00:58:58 UTC
This issue will be obsolete when live roundtrip is removed.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo