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
* The check state provider will supply the logic for deciding whether the
     * check box associated with each item should be checked, grayed or 
     * unchecked. 
     * @param checkStateProvider	The provider.
     * @since 3.5
     */
    public void setCheckStateProvider(ICheckStateProvider checkStateProvider) {
    	this.checkStateProvider = checkStateProvider;
    	refresh();
    }
    
    /*
     * Extends this method to update check box states.
     */
    protected void doUpdateItem(Item item, Object element) {
    	super.doUpdateItem(item, element);
    	if(!item.isDisposed() && checkStateProvider != null) {
			setChecked(element, checkStateProvider.isChecked(element));
			setGrayed(element, checkStateProvider.isGrayed(element));
    	}
	}
	/**
     * Applies the checked and grayed states of the given widget and its
     * descendents.
     *
     * @param checked a set of elements (element type: <code>Object</code>) 
     * @param grayed a set of elements (element type: <code>Object</code>) 
     * @param widget the widget
     */
    private void applyState(CustomHashtable checked, CustomHashtable grayed,