Bug 256889 [Viewers] [table] IAE (Index out of bounds) after selecting rows in virtual TableViewer
Steps to reproduce: - Load the attached snippet - Press button "Select all elements" The button's selection listener first calls table.selectAll(); and then loads the current selection of the TableViewer via tableViewer.getSelection(); --> Exception: Exception in thread "main" java.lang.IllegalArgumentException: Index out of bounds at org.eclipse.swt.SWT.error(SWT.java:3761) at org.eclipse.swt.SWT.error(SWT.java:3695) at org.eclipse.swt.SWT.error(SWT.java:3666) at org.eclipse.swt.widgets.Widget.error(Widget.java:463) at org.eclipse.swt.widgets.Table.getItem(Table.java:2262) at org.eclipse.jface.viewers.TableViewer.doGetItem(TableViewer.java:233) at org.eclipse.jface.viewers.AbstractTableViewer.getVirtualSelection(AbstractTableViewer.java:498) at org.eclipse.jface.viewers.AbstractTableViewer.getSelectionFromWidget(AbstractTableViewer.java:468) at org.eclipse.jface.viewers.StructuredViewer.getSelection(StructuredViewer.java:972) at VirtualTableTest$2.widgetSelected(VirtualTableTest.java:98) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422) at VirtualTableTest.runTableTest(VirtualTableTest.java:162) at VirtualTableTest.main(VirtualTableTest.java:175)
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractTableViewer.java
/**
	 * Returns the column at the given, zero-relative index in the receiver.
	 * Throws an exception if the index is out of range. Columns are returned in
	 * the order that they were created. If no TableColumns were created by the
	 * programmer, this method will throw ERROR_INVALID_RANGE despite the fact
	 * that a single column of data may be visible in the table. This occurs
	 * when the programmer uses the table like a list, adding items but never
	 * creating a column.
	 *
	 * @param index
	 *            the index of the column to return
	 * @return the column at the given index
	 * @exception IllegalArgumentException -
	 *                if the index is not between 0 and the number of elements
	 *                in the list minus 1 (inclusive)
	 *
	 * @since 3.3
	 */
	protected abstract Widget doGetColumn(int index);
	/**
	 * Returns the item at the given, zero-relative index in the receiver.
	 * Throws an exception if the index is out of range.
	 *
	 * @param index
	 *            the index of the item to return
	 * @return the item at the given index
	 * @exception IllegalArgumentException -
	 *                if the index is not between 0 and the number of elements
	 *                in the list minus 1 (inclusive)
	 *