Community
Participate
Working Groups
IllegalArgumentException when opening the header context menu in a datapool with no records. Create a datapool with one or more variables and no records and attempt to open the header context menu. The following exception is thrown: java.lang.IllegalArgumentException: Index out of bounds at org.eclipse.swt.SWT.error(SWT.java:4064) at org.eclipse.swt.SWT.error(SWT.java:3998) at org.eclipse.swt.SWT.error(SWT.java:3969) at org.eclipse.swt.widgets.Widget.error(Widget.java:467) at org.eclipse.swt.widgets.Table.getItem(Table.java:2496) at org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable.getColumnIndex(DatapoolTable.java:1283) at org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable.access$25(DatapoolTable.java:1280) at org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable$4.handleEvent(DatapoolTable.java:1263) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1076) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061) at org.eclipse.swt.widgets.Widget.showMenu(Widget.java:1462) at org.eclipse.swt.widgets.Widget.wmContextMenu(Widget.java:1558) at org.eclipse.swt.widgets.Table.windowProc(Table.java:5617) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4886) at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2362) at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:436) at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:430) at org.eclipse.swt.widgets.Table.windowProc(Table.java:5691) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4873) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2459) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3655) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2601) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2565) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2399) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:669) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:662) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:599) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574) at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
In addition, the following inconsistencies exist when there are no records in the datapool: -The cut/copy/paste context menus are enabled (header/rows).. -The remove variable context menu on the header row does not automatically delete the column (header/rows). Instead it opens the Delete Variable dialog (requires a name change to Remove Variable) with no variable selected. -The insert record context menu is not enabled (header/rows). -Inconsistencies when opening a datapool with no records compared to deleting all of the records.
Created attachment 168768 [details] Patch.
Added a new test case to /org.eclipse.hyades.test.ui.datapool.tests/manual/datapool/Test.UI.DatapoolEditor_editing.testsuite. The attached patch and test case are checked in to CVS (HEAD).
Verified in TPTP-4.7.0RC4-201006081927. Closing.