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 139496 - relationship discovery does not restore containment link and role binding
Summary: relationship discovery does not restore containment link and role binding
Status: VERIFIED FIXED
Alias: None
Product: uml
Classification: Unclassified
Component: General Diagram (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Trey Spiva
URL:
Keywords:
: 139499 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-09 22:16 UTC by Peter Lam
Modified: 2008-08-15 21:02 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
discover relationship on binding (1.56 MB, application/octet-stream)
2008-08-14 00:00 UTC, Peter Lam
Details
Using the same actions, and things are working correctly. (667.02 KB, application/octet-stream)
2008-08-14 00:11 UTC, Trey Spiva
Details
Relationship discovery succeeded, but unable to save the diagram. (2.58 KB, text/plain)
2008-08-14 23:45 UTC, George Vasick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Lam 2008-07-09 22:16:00 UTC
build 20080709

Clicking on the Discover Relationship toolbar button does not restore the containment link between package and an
element or class and class.

- create a class diagram
- create a package and a class
- create a containment between the package and the class
- delete the containment link from the diagram
- click on the Discover Relationship toolbar button
Result: nothing happens
Comment 1 Peter Lam 2008-07-09 22:26:45 UTC
does not restore role binding between design pattern and roles as well.
Comment 2 Peter Lam 2008-07-09 22:28:17 UTC
comment link is also not restored.
Comment 3 Trey Spiva 2008-07-14 16:50:37 UTC
*** Issue 139499 has been marked as a duplicate of this issue. ***
Comment 4 Viktor Lapitski 2008-07-14 17:30:57 UTC
i see the containment link is deleted from the model when 
it should have been deleted only from diagram. So RD 
doesn't find anything.
For role binding i wasn't able to reproduce.
Comment 5 Sergey Petrov 2008-07-14 18:52:28 UTC
in which build do you see removal of containment from model when shouldn't? it was fixed a week ago.
Comment 6 Peter Lam 2008-07-14 19:29:55 UTC
Just tried on build 20080714 and I still can reproduce the 3 different things listed here.
- role binding
- nested/containment link
- comment link

For role binding, here's the scenario:
- create a design pattern
- create a role of any type
- create a role binding between the role and design pattern
- delete the role binding from the diagram only
- click on Discover Relationship button

As for nested/containment link, deleting the link from the diagram doesn't move the class or element out of the package
from the project tree but clicking on Discover Relationship button doesn't restore the link on the diagram.
Comment 7 Trey Spiva 2008-08-13 22:45:42 UTC
I also was not able to reproduce the design pattern/role binding issue.
Comment 8 Trey Spiva 2008-08-13 23:09:21 UTC
fixed.

http://hg.netbeans.org/uml-main/rev/acae29f27ab7

again I was not able to reproduce the binding part.
Comment 9 Peter Lam 2008-08-13 23:19:46 UTC
I still can reproduce the binding problem not being discovered in build 20080813 from the binding scenario in the comment.
Comment 10 Trey Spiva 2008-08-13 23:49:12 UTC
I followed the state steps and was not able to reproduce the problem.  What is selected after you delete the relationship?  When the dialog appears do you 
check the check box?
Comment 11 Peter Lam 2008-08-13 23:59:17 UTC
I didn't check the checkbox. Nothing's selected after the binding was deleted. see attached video. 
Comment 12 Peter Lam 2008-08-14 00:00:27 UTC
Created attachment 67324 [details]
discover relationship on binding
Comment 13 Trey Spiva 2008-08-14 00:10:12 UTC
As far as I can tell I am doing the same thing as you.  Check out the video that I am uploading.
Comment 14 Trey Spiva 2008-08-14 00:11:34 UTC
Created attachment 67325 [details]
Using the same actions, and things are working correctly.
Comment 15 George Vasick 2008-08-14 23:45:12 UTC
Created attachment 67480 [details]
Relationship discovery succeeded, but unable to save the diagram.
Comment 16 Trey Spiva 2008-08-15 17:17:49 UTC
That is strange I did not get the exception.
Comment 17 George Vasick 2008-08-15 17:20:19 UTC
It is there every time for me.  Maybe you need somebody to take a look on windows.

Thanks,
George
Comment 18 Trey Spiva 2008-08-15 18:02:14 UTC
George your exception looks to be the same as the Issue 143995.
Comment 19 Trey Spiva 2008-08-15 18:17:32 UTC
Reviewed
Comment 20 Peter Lam 2008-08-15 20:18:18 UTC
verified in build 20080815. All problem listed in this issue are now working.
Comment 21 George Vasick 2008-08-15 20:28:31 UTC
Are separate issues filed for thing not working?
Comment 22 Trey Spiva 2008-08-15 20:53:16 UTC
In this case yes.  The exception had nothing to do with the relationship discovery problem.  It just happen that after you did relationship discovery you did 
another action that uncovered the exception.  It was the save all action that caused the exception not the relationship discovery.  

Also the exception issue was actually reported a day before it was noted in this issue.  Therefore a new issue was opened for the exception reported in this 
issue, it was already reported because it was a more general usecase.

BTW the exception issue has already been integrated.
Comment 23 George Vasick 2008-08-15 21:02:54 UTC
Sorry.  I misread Peter's previous comment.