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 78388 - moving diagram elements using arrow keys causes NPE
Summary: moving diagram elements using arrow keys causes NPE
Status: VERIFIED FIXED
Alias: None
Product: uml
Classification: Unclassified
Component: General Diagram (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Trey Spiva
URL:
Keywords: A11Y
Depends on:
Blocks:
 
Reported: 2006-06-19 22:43 UTC by bugbridge
Modified: 2006-11-09 14:05 UTC (History)
2 users (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 bugbridge 2006-06-19 22:43:20 UTC
Original status: 1-Dispatched; Suggested Status: NEW

These items should be added to the Keywords: A11Y
Original submitter: akorostelev

Description:
java.lang.NullPointerException appears after attempt to move several elements
using CTRL with arrow keys.

reproduced with Coke milestone 9.
Tested with several different diagrams and different elements.

How to reproduce:
- Create uml project
- create diagram. e.g. class.
- put two class elements and name them.
- click on the first class on diagram to select it.
- hold CTRL key and use arrow keys to move class element on diagram.
- select anothe class and move it using CTEL with arrow keys.
- select first class again.
- try to move it with CTRL and arrow keys.

The follwoing exception is thrown:
java.lang.NullPointerException
	at com.tomsawyer.diagramming.TSMoveControl.onDragTo(DashoA9*..)
	at
org.netbeans.modules.uml.ui.swing.drawingarea.ADMoveSelectedKeyAdapter.move(ADMoveSelectedKeyAdapter.java:135)
	at
org.netbeans.modules.uml.ui.swing.drawingarea.ADGraphWindow.move(ADGraphWindow.java:387)
	at
org.netbeans.modules.uml.ui.swing.drawingarea.ADDrawingAreaActions.actionPerformed(ADDrawingAreaActions.java:864)
	at javax.swing.JComponent$ActionStandin.actionPerformed(JComponent.java:3227)
	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1571)
	at javax.swing.JComponent.processKeyBinding(JComponent.java:2763)
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2798)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2726)
	at java.awt.Component.processEvent(Component.java:5265)
	at java.awt.Container.processEvent(Container.java:1966)
	at java.awt.Component.dispatchEventImpl(Component.java:3955)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Component.dispatchEvent(Component.java:3803)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1810)
	at
java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:672)
	at
java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:920)
	at
java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:798)
	at
java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:636)
	at java.awt.Component.dispatchEventImpl(Component.java:3841)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Window.dispatchEventImpl(Window.java:1774)
	at java.awt.Component.dispatchEvent(Component.java:3803)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Workaround:
move elements with mouse.
Comment 1 Trey Spiva 2006-11-07 18:28:53 UTC
The Elements to be moved is not gathered everytime the user presses the
ctrl-<arrow> keys.
Comment 2 Trey Spiva 2006-11-08 18:02:36 UTC
We are now gathering the selected elements when the user moves the elements by
keyboard.
Comment 3 Andrew Korostelev 2006-11-09 14:05:29 UTC
verified in ide-coco-061108_9