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 99019 - a11y: NPE when using keyboard to delete Region Column from Composite State element
Summary: a11y: NPE when using keyboard to delete Region Column from Composite State el...
Status: VERIFIED FIXED
Alias: None
Product: uml
Classification: Unclassified
Component: Diagram State (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Thuy.d Nguyen
URL:
Keywords: A11Y
Depends on:
Blocks:
 
Reported: 2007-03-26 18:56 UTC by Peter Lam
Modified: 2007-04-10 08:17 UTC (History)
0 users

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 2007-03-26 18:56:04 UTC
Deleting Region Column from Composite State element using keyboard results in
the following NPE.

Repro steps:
- create a uml project
- create a state diagram
- create a Composite State element
- add and name a few region columns to the element
- use Shift-Left/RightArrow key to navigate to one of the region column
- Shift-F10 to bring up the context menu on the element select Region->Delete
This Region Column
Result: the dialog pops up showing the following NPE:

java.lang.NullPointerException
	at 

org.netbeans.modules.uml.ui.products.ad.compartments.ETZonesCompartment.getCompartmentColumnIndex

(ETZonesCompartment.java:907)
	at
org.netbeans.modules.uml.ui.products.ad.compartments.ETZonesCompartment.onHandleButton

(ETZonesCompartment.java:314)
	at 

org.netbeans.modules.uml.ui.products.ad.application.action.ContextMenuActionClass.actionPerformed

(ContextMenuActionClass.java:49)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
	at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
	at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1170)
	at
javax.swing.plaf.basic.BasicPopupMenuUI$Actions.doReturn(BasicPopupMenuUI.java:438)
	at javax.swing.plaf.basic.BasicPopupMenuUI$Actions.actionPerformed

(BasicPopupMenuUI.java:412)
	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1636)
	at javax.swing.JComponent.processKeyBinding(JComponent.java:2844)
	at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:267)
	at javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:216)
	at javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:2921)
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2913)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2807)
	at java.awt.Component.processEvent(Component.java:5815)
	at java.awt.Container.processEvent(Container.java:2058)
	at java.awt.Component.dispatchEventImpl(Component.java:4410)
	at java.awt.Container.dispatchEventImpl(Container.java:2116)
	at java.awt.Component.dispatchEvent(Component.java:4240)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1848)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent

(DefaultKeyboardFocusManager.java:693)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent

(DefaultKeyboardFocusManager.java:958)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions

(DefaultKeyboardFocusManager.java:830)
	at
java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:657)
	at java.awt.Component.dispatchEventImpl(Component.java:4282)
	at java.awt.Container.dispatchEventImpl(Container.java:2116)
	at java.awt.Window.dispatchEventImpl(Window.java:2429)
	at java.awt.Component.dispatchEvent(Component.java:4240)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
	at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Comment 1 Thuy.d Nguyen 2007-03-26 22:08:17 UTC
This issue is not a regression. It occurs in both coco and griffin as well. The
code logic to determine the selected  column/row region is based on the location
of the mouse click on the region to get the context menu, but if you use F10 to
bring up the context menu,  the mouse point is null; hence causing this NPE.
Comment 2 Peter Lam 2007-03-26 22:24:57 UTC
There's an issue 90636 that a region row or column can not be deleted in
Coco/Griffin but the NPE does not pop up. It just didn't work quietly. Perhaps,
the exception was also returned but in ide log file instead of popping up a
dialog for that. If so, then this is not a regression.
Comment 3 Thuy.d Nguyen 2007-03-27 01:40:08 UTC
Added logic to get the index of the target region based on the selection state
rather than based on the mouse point if Shift-F10 is used to bring up the
context menu.

Fixed and integrated to trunk.
Comment 4 Peter Lam 2007-04-10 08:17:19 UTC
verified in build 070409_13