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.
Build: NetBeans IDE Dev (Build 201306122301) VM: Java HotSpot(TM) 64-Bit Server VM, 23.25-b01, Java(TM) SE Runtime Environment, 1.7.0_25-b13 OS: Windows 7 User Comments: mkhramov: SQL Copy Cell value command invoked on empty cell Stacktrace: java.lang.IndexOutOfBoundsException: valid viewIndex: 0 <= index < 0 but was: -1 at org.jdesktop.swingx.sort.DefaultSortController.convertRowIndexToModel(DefaultSortController.java:311) at javax.swing.JTable.convertRowIndexToModel(JTable.java:2641) at javax.swing.JTable.getValueAt(JTable.java:2716) at org.netbeans.modules.db.dataview.output.DataViewTableUI$7.actionPerformed(DataViewTableUI.java:381) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
Created attachment 135757 [details] stacktrace
Created attachment 135820 [details] proposed patch v1 The patches fixes the problem by disabling the actions in the menu when no row is selected. I included other menu entries that just turn to no-ops when invoked without a selection, so that this looks and feels consistent.
Applied as http://hg.netbeans.org/core-main/rev/73af42a196d5 Thank you for the patch, Matthias.
http://hg.netbeans.org/core-main/rev/071dc065358f I'm sorry, I've had to revert part of the patch. Some listeners, e.g. TableSelectionListener, were notified before the MouseListener that updates field selectedRows.
Integrated into 'main-golden', will be available in build *201306181109* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/73af42a196d5 User: Jaroslav Havlin <jhavlin@netbeans.org> Log: #231218: IndexOutOfBoundsException: valid viewIndex: 0 <= index < 0 but was: -1 Patch by Matthias42.