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
private void internalCollectGrayed(List result, Widget widget) {
	Item[] items = getChildren(widget);
	for (int i = 0; i < items.length; i++) {
		Item item = items[i];
		if (item instanceof TreeItem && ((TreeItem) item).getGrayed()) {
			Object data = item.getData();
			if (data != null)
				result.add(data);
		}
		internalCollectGrayed(result, item);
	}
}
/**
 * Sets the checked state of all items to correspond to the given set of checked elements.
 *
 * @param checkedElements the set (element type: <code>Object</code>) of elements which are checked
 * @param widget the widget
 */
private void internalSetChecked(Set checkedElements, Widget widget) {
	Item[] items = getChildren(widget);
	for (int i = 0; i < items.length; i++) {
		TreeItem item = (TreeItem) items[i];
		Object data = item.getData();
		if (data != null) {
			boolean checked = checkedElements.contains(data);
			if (checked != item.getChecked()) {
				item.setChecked(checked);
			}
		}
		internalSetChecked(checkedElements, item);