Bug 270457 [Viewers] [regression] CheckBoxTreeViewer clears check state after collapseAll
Hi there :) In my RCP I've a CheckBoxTreeViewer that looses check states for invisible items. Turns out if a disable the collapseAll() call things go back to normal. So, in a tree like this: [x] root [x] sub a collapseAll expandAll will create this: [x] root [] sub Could still be my fault, feel free to have me try some workarounds or other tests that help you find the cause...
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/CheckboxTreeViewer.java
/**
     * List of check state listeners (element type: <code>ICheckStateListener</code>).
     */
    private ListenerList checkStateListeners = new ListenerList();
    
    /**
     * Provides the desired state of the check boxes.
     */
    private ICheckStateProvider checkStateProvider;
    /**
     * Last item clicked on, or <code>null</code> if none.
     */
    private TreeItem lastClickedItem = null;
    /**
     * Creates a tree viewer on a newly-created tree control under the given parent.
     * The tree control is created using the SWT style bits: <code>CHECK</code> and <code>BORDER</code>.
     * The viewer has no input, no content provider, a default label provider, 
     * no sorter, and no filters.
     *
     * @param parent the parent control
     */
    public CheckboxTreeViewer(Composite parent) {
        this(parent, SWT.BORDER);
    }
    /**
     * Creates a tree viewer on a newly-created tree control under the given parent.