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 80500 - Exception on pasting element in Schema view
Summary: Exception on pasting element in Schema view
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: Nathan Fiedler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-18 17:07 UTC by kozlov
Modified: 2006-07-27 16:00 UTC (History)
3 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 kozlov 2006-07-18 17:07:18 UTC
Reproduced in build 060718.

To reproduce the bug:

- create a 'newpo' schema;
- copy 'billTo' element;
- paste it under the same 'sequence'.

Exception:

java.lang.IllegalStateException: Should not be invoked at all. Paste types:
[org.netbeans.modules.xml.schema.ui.nodes.ComponentPasteType$PasteTypeImpl@8a6823]
	at
org.openide.explorer.ExplorerActionsImpl$OwnPaste.actionPerformed(ExplorerActionsImpl.java:461)
	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1634)
	at javax.swing.JComponent.processKeyBinding(JComponent.java:2824)
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2870)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2787)
	at java.awt.Component.processEvent(Component.java:5776)
	at java.awt.Container.processEvent(Container.java:1984)
	at java.awt.Component.dispatchEventImpl(Component.java:4407)
	at java.awt.Container.dispatchEventImpl(Container.java:2042)
	at java.awt.Component.dispatchEvent(Component.java:4237)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1828)
	at
java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:693)
	at
java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:952)
	at
java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:824)
	at
java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:657)
	at java.awt.Component.dispatchEventImpl(Component.java:4279)
	at java.awt.Container.dispatchEventImpl(Container.java:2042)
	at java.awt.Window.dispatchEventImpl(Window.java:2405)
	at java.awt.Component.dispatchEvent(Component.java:4237)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:600)
	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 Nathan Fiedler 2006-07-26 00:49:05 UTC
This does not reproduce now, although I suspect Chris's fix for issue 77851 may
have fixed this as well.
Comment 2 kozlov 2006-07-26 14:00:52 UTC
The bug still reproduced. It is necessary to switch to 'Tree' representation and
use 'Ctrl + C' and 'Ctrl + V'.
Comment 3 Nathan Fiedler 2006-07-27 00:42:05 UTC
Thank you for finding the reproduce case. Turns out it can reproduce in both
column and tree views, and it also appears in column view of WSDL editor. The
problem was the InputMap for those components should not have contained the
cut/copy/paste actions returned by ExplorerUtils. In fact, there is no need for
the InputMap whatsoever. It was a hack around a related problem, which Chris has
fixed via issue 77851 -- since that is fixed, the InputMap is unnecessary, and
indeed brings about this exception.

Fixed in release55 branch for both schema and WSDL editors:

schema/schemaui/src/org/netbeans/modules/xml/schema/ui/basic/SchemaColumn.java;
new revision: 1.1.2.21; previous revision: 1.1.2.20
schema/schemaui/src/org/netbeans/modules/xml/schema/ui/basic/SchemaTreeView.java;
new revision: 1.1.2.10; previous revision: 1.1.2.9
wsdlui/src/org/netbeans/modules/xml/wsdl/ui/netbeans/module/WSDLColumn.java;
new revision: 1.1.2.5; previous revision: 1.1.2.4
wsdlui/src/org/netbeans/modules/xml/wsdl/ui/netbeans/module/WSDLTreeViewMultiViewElement.java;
new revision: 1.1.2.16; previous revision: 1.1.2.15
Comment 4 kozlov 2006-07-27 16:00:19 UTC
Verified in build060726.