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 84879 - 'Change Order...' still leads to IndexOutOfBoundsException
Summary: 'Change Order...' still leads to IndexOutOfBoundsException
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-09-14 11:06 UTC by Andrei Chistiakov
Modified: 2006-09-15 11:49 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
newXmlSchema1 (865 bytes, text/xml)
2006-09-14 11:07 UTC, Andrei Chistiakov
Details
newXmlSchema2 (577 bytes, text/xml)
2006-09-14 11:07 UTC, Andrei Chistiakov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Chistiakov 2006-09-14 11:06:53 UTC
Reproduced in build 060913 (JDK 1.6 Beta 2)

To reproduce the bug:

- put both attached schemas into the same folder of a project;
- open the project;
- open newXmlSchema1;
- select 'Referenced Schemas|redefine' in column view;
- invoke 'Change Order...' popup menu command;
- move 'CT0' item *three* levels down in the list and push OK.

java.lang.IndexOutOfBoundsException: Index: 3, Size: 2
	at java.util.ArrayList.RangeCheck(ArrayList.java:547)
	at java.util.ArrayList.set(ArrayList.java:337)
	at
org.netbeans.modules.xml.schema.ui.nodes.RefreshableChildren$IndexSupport.reorder(RefreshableChildren.java:141)
	at org.openide.nodes.IndexedCustomizer.doClose(IndexedCustomizer.java:295)
	at org.openide.nodes.TMUtil$IndexC.run(TMUtil.java:334)
	at org.openide.nodes.TMUtil.exec(TMUtil.java:192)
	at org.openide.nodes.TMUtil.showIndexedCustomizer(TMUtil.java:140)
	at org.openide.nodes.Index$Support.showIndexedCustomizer(Index.java:271)
	at org.openide.nodes.Index$Support.reorder(Index.java:261)
	at
org.netbeans.modules.xml.schema.ui.nodes.RefreshableChildren.reorder(RefreshableChildren.java:89)
	at org.openide.actions.ReorderAction.performAction(ReorderAction.java:57)
	at org.openide.util.actions.NodeAction$DelegateAction$1.run(NodeAction.java:537)
	at
org.netbeans.modules.openide.util.ActionsBridge.doPerformAction(ActionsBridge.java:53)
	at
org.openide.util.actions.NodeAction$DelegateAction.actionPerformed(NodeAction.java:533)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:377)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:232)
	at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
	at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1157)
	at
javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1198)
	at java.awt.Component.processMouseEvent(Component.java:5999)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3240)
	at java.awt.Component.processEvent(Component.java:5764)
	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.LightweightDispatcher.retargetMouseEvent(Container.java:4248)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3912)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3842)
	at java.awt.Container.dispatchEventImpl(Container.java:2028)
	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 Andrei Chistiakov 2006-09-14 11:07:20 UTC
Created attachment 33939 [details]
newXmlSchema1
Comment 2 Andrei Chistiakov 2006-09-14 11:07:37 UTC
Created attachment 33940 [details]
newXmlSchema2
Comment 3 Nathan Fiedler 2006-09-14 19:22:20 UTC
It will be necessary for us to disallow reordering the children of the redefine
node. For now, our choices are limited to A) not showing any of the nodes from
the redefined schema, B) disallow reordering on redefine, or C) categorize the
children of the redefine node. Option (C) is not feasible at this late stage,
and (A) would take away vital information that the user needs, so (B) is our
best choice.

Fixed in release55 branch.

schema/schemaui/src/org/netbeans/modules/xml/schema/ui/nodes/schema/RedefineNode.java;
new revision: 1.1.2.5; previous revision: 1.1.2.4
Comment 4 Andrei Chistiakov 2006-09-15 11:49:25 UTC
Verified n build 060914_1.