Bug 150805 [Import/Export] Incomplete validation when importing from directory
The following instance methods of CheckboxTreeViewer class don't fire any CheckStateChangedEvent. Affected methods: setAllChecked(...) setCheckedElements(...) setChecked(...) Steps to reproduce the bug: 1. File -> Import... 2. File System -> Next 3. Choose a "From directory" using the Browse... button 4. Check the root element from the left pane (the error message saying that "There are no resources currently selected for import." should disappear) 5. Press the Deselect All button and see that no error message is displayed at all!! 6. Recheck the root element twice and the error message is displayed again!! Solution: Add fireCheckStateChanged calls inside affected methods
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/CheckboxTreeViewer.java
/**
     * Gathers the checked and grayed states of the given widget and its
     * descendents.
     *
     * @param checked a writeable set of elements (element type: <code>Object</code>) 
     * @param grayed a writeable set of elements (element type: <code>Object</code>) 
     * @param widget the widget
     */
    private void gatherState(CustomHashtable checked, CustomHashtable grayed,
            Widget widget) {
        Item[] items = getChildren(widget);
        for (int i = 0; i < items.length; i++) {
            Item item = items[i];
            if (item instanceof TreeItem) {
                Object data = item.getData();
                if (data != null) {
                    TreeItem ti = (TreeItem) item;
                    if (ti.getChecked()) {
						checked.put(data, data);
					}
                    if (ti.getGrayed()) {
						grayed.put(data, data);
					}
                }
            }
            gatherState(checked, grayed, item);
        }
    }
    /* (non-Javadoc)
     * Method declared on ICheckable.