Bug 32254 [Viewers] AbstractTreeViewer uses HashSet to remember expansion state
I20030216 The custom hash table should be used instead. Otherwise expansion state may be lost due to a different equals implementation of the element and the IElementComparer.
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/CheckboxTreeViewer.java
public void run() {
				l.checkStateChanged(event);
			}
		});
	}	
	
}
/**
 * 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(Set checked, Set 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.add(data);
				if (ti.getGrayed())
					grayed.add(data);
			}
		}
		gatherState(checked, grayed, item);