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 144140 - some ui actions causes diagram to be frozen
Summary: some ui actions causes diagram to be frozen
Status: RESOLVED INCOMPLETE
Alias: None
Product: uml
Classification: Unclassified
Component: General Diagram (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@uml
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-16 00:30 UTC by Peter Lam
Modified: 2009-05-25 21:06 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 Peter Lam 2008-08-16 00:30:04 UTC
This problem occurred only when JDK 1.6.0_10 RC was used.

Once the diagram is frozen, it has to be closed and reopened before it can be used again.

- create a diagram of any type
- drop an element on the diagram
- select the element so that the context palette appears
- right click on the selected element so the context menu is opened
- now, while the context menu is still opened, try to create something (eg, an edge) from the context palette
- now the diagram is frozen. clicking anywhere in the diagram does not help until selecting an element on the modeling
palette. Esc will only dismiss the context palette but diagram is still frozen.
Comment 1 Peter Lam 2008-08-16 00:32:24 UTC
The jdk bug is 6737888 which can be viewed from the following link.
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6737888
Comment 2 Peter Lam 2008-08-16 00:33:57 UTC
This is just a tracking issue for the jdk bug in jdk 1.6.0_10 rc.
Comment 3 Peter Lam 2008-08-27 17:32:41 UTC
Transfering the following comments from lvv from issue 141247.

------- Additional comments from lvv Fri Aug 22 19:50:13 +0000 2008 -------

http://hg.netbeans.org/uml-main?cmd=changeset;node=8b99aa7c941e

------- Additional comments from lvv Fri Aug 22 19:37:51 +0000 2008 -------

the reason for the original case is that by default (ie. default 
installation, in particular no look and feel changes/tweaks, etc...) 
in jdk1.6.0_10 closing of PopupMenu consumes MOUSE_PRESSED, whereis it 
isn't in the jdks before (at least in JDKs 1.5.0_10, 1.6.0_04). 
According to Java API sources bundled with jdk ditsribution 
the behaviour is controlled by the following lines in 

javax.swing.plaf.basic.BasicPopupMenuUI$MouseGrabber.eventDispatched() :

...
                    boolean consumeEvent =
                        UIManager.getBoolean("PopupMenu.consumeEventOnClose");
                    // Consume the event so that normal processing stops.
                    if(consumeEvent && !(src instanceof MenuElement)) {
                        me.consume();
                    }
...

specifically - UIManager.getBoolean("PopupMenu.consumeEventOnClose") started to 
return "true" in jdk1.6.0_10.

That results in that with jdk1.6.0_10 UML element's palette 
PaletteButton doesn't receive MOUSE_PRESSED before receiving 
corresponding MOUSE_RELEASED. 

To workaround the situation i put an additional check. It will 
allow to avoid "frozing" of the diagram. Though it will still not allow 
for the behaviour we have with other jdks - ie. successfull creation 
of the edge on the MOUSE_RELEASED that comes right after MOUSE_PRESSED 
that dismissed the popup menu. 
Comment 4 Peter Lam 2008-09-03 23:27:38 UTC
marking it incomplete since the bug is in jdk.