Bug 319600 [Viewers] CheckboxTableViewer.getCheckedElements based on virtual table returns null data objects
Build Identifier: 20100617-1415 If programmatically select all rows in CheckboxTableViewer created upon virtual table using setAllChecked, then getCheckedElements method returns null data objects, probably, for non-displayed rows. In spite of the fact, that table is virtual, it is expected that getCheckedElements returns concrete non-null data objects associated with rows. Reproducible: Always Steps to Reproduce: 1. Launch attached snippet. 2. Click "Select/Deselect All" to select all rows, then click "Null Rows" and message with number of rows with null data objects will be displayed.
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/CheckboxTableViewer.java
* No <code>TableColumn</code> is added. SWT does not require a 
     * <code>TableColumn</code> if showing only a single column with no header.
     * SWT correctly handles the initial sizing and subsequent resizes in this case.
     *
     * @param parent the parent control
     * @param style SWT style bits
     * 
     * @since 2.0
     * @return CheckboxTableViewer
     */
    public static CheckboxTableViewer newCheckList(Composite parent, int style) {
        Table table = new Table(parent, SWT.CHECK | style);
        return new CheckboxTableViewer(table);
    }
    /**
     * Creates a table viewer on the given table control.
     * The <code>SWT.CHECK</code> style bit must be set on the given table control.
     * The viewer has no input, no content provider, a default label provider, 
     * no sorter, and no filters.
     *
     * @param table the table control
     */
    public CheckboxTableViewer(Table table) {
        super(table);
    }
    /* (non-Javadoc)
     * Method declared on ICheckable.
     */
    public void addCheckStateListener(ICheckStateListener listener) {
        checkStateListeners.add(listener);