Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 76547 - NPE and all links are lost while copying elements to another class diagram
NPE and all links are lost while copying elements to another class diagram
Product: uml
Classification: Unclassified
Component: General Diagram
All Windows XP
: P1 (vote)
Assigned To: Trey Spiva
: 78369 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2006-05-18 10:49 UTC by Alexandr Scherbatiy
Modified: 2006-09-28 11:22 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT

create diagram from selected elements (110.17 KB, image/png)
2006-05-18 10:54 UTC, Alexandr Scherbatiy
copy all elements to another diagram (117.91 KB, image/png)
2006-05-18 10:54 UTC, Alexandr Scherbatiy
Simple Graph Editor application (23.58 KB, application/octet-stream)
2006-05-22 08:58 UTC, Alexandr Scherbatiy

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Scherbatiy 2006-05-18 10:49:56 UTC
I have reverse engineered a UML project from my java project
and created a class diagram by creating a diagram from selected elements.
Then I created another class diagram and copied all elements 
from the first diagram to the second.
The NPE pops and there are no any links on the second diagram.

	at com.tomsawyer.editor.TSEWindowInputTool.mouseReleasedEvent(DashoA9*..)
	at com.tomsawyer.editor.TSEWindowInputTool.access$400(DashoA9*..)
	at com.tomsawyer.editor.g6.mouseReleased(DashoA9*..)
	at java.awt.AWTEventMulticaster.mouseReleased(
	at java.awt.Component.processMouseEvent(
	at javax.swing.JComponent.processMouseEvent(
	at java.awt.Component.processEvent(
	at java.awt.Container.processEvent(
	at java.awt.Component.dispatchEventImpl(
	at java.awt.Container.dispatchEventImpl(
	at java.awt.Component.dispatchEvent(
	at java.awt.LightweightDispatcher.retargetMouseEvent(
	at java.awt.LightweightDispatcher.processMouseEvent(
	at java.awt.LightweightDispatcher.dispatchEvent(
	at java.awt.Container.dispatchEventImpl(
	at java.awt.Window.dispatchEventImpl(
	at java.awt.Component.dispatchEvent(
[catch] at java.awt.EventQueue.dispatchEvent(
	at java.awt.EventDispatchThread.pumpEvents(
	at java.awt.EventDispatchThread.pumpEvents(
Comment 1 Alexandr Scherbatiy 2006-05-18 10:54:19 UTC
Created attachment 30488 [details]
create diagram from selected elements
Comment 2 Alexandr Scherbatiy 2006-05-18 10:54:57 UTC
Created attachment 30489 [details]
copy all elements to another diagram
Comment 3 Peter Lam 2006-05-19 23:21:11 UTC
I tried to reproduce the problem on my Windows XP 
Comment 4 Peter Lam 2006-05-19 23:30:19 UTC
ops, I pressed the Enter key after adding myself to the cc list before
completing my comment. Here it is.

I tried several times but not able to replicate the problem. I reverse
engineered the sample application from the following URL, created class diagram
(called it cld#1) from all elements selected in the bankpack package including
the bankpack itself, create a new class diagram, I then selected all elements
from cld#1, selected Edit->Copy, and then pasted (Edit->Paste) to the new
diagram. The result is that all copied elements are pasted to the new class
diagram. No exception and no error from the ide log file either.

Could you please provide more detail on how to reproduce the problem. Thanks.
Comment 5 Alexandr Scherbatiy 2006-05-22 08:58:46 UTC
Created attachment 30541 [details]
Simple Graph Editor application
Comment 6 Alexandr Scherbatiy 2006-05-22 09:10:19 UTC
I have attached my SimpleGraphEditor application. 
Try to do the next actions:
- Create a UML project by reverse engineering my app
- Select all elements under 'diagram.element' package
- Create class diagram from selected elements
- Create a class diagram under UML Model tree
- Select all elements from the first digram and
  copy them to the second diagram.
The issue still exists.
Comment 7 Peter Lam 2006-05-23 00:44:59 UTC
Thanks for providing your app. I am able to reproduce the problem with your app
now. I got the same exception which seems to indicate problem with redrawing. As
for the links not showing, you can click on the "Relationship Discovery" toolbar
button on the diagram window which draws all the existing links on the diagram.
I also tried other things after dismissing the exception dialog and so far
everything else I tried seemed to work ok functionally which can be used as a
workaround for now.

What is strange is that I tried with a few other java projects, but I was not
able to reproduce this problem. Looks like there might be something used in your
project that caused the problem but I can't tell yet.
Comment 8 Trey Spiva 2006-09-25 22:57:46 UTC
The problem are the deverivation classifier.  When being copied, the
compartments are not being initialized correctly
Comment 9 Trey Spiva 2006-09-25 23:37:56 UTC
The derivation classifier draw engine is now copying correctly.
Comment 10 Andrew Korostelev 2006-09-28 11:18:14 UTC
*** Issue 78369 has been marked as a duplicate of this issue. ***
Comment 11 Andrew Korostelev 2006-09-28 11:22:08 UTC
verified on uml nbms 20060926.

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