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/TreeViewer.java
* Method declared in AbstractTreeViewer.
 */
protected void setExpanded(Item node, boolean expand) {
	((TreeItem) node).setExpanded(expand);
}
/**
 * The tree viewer implementation of this <code>Viewer</code> framework
 * method ensures that the given label provider is an instance
 * of <code>ILabelProvider</code>.
 */
public void setLabelProvider(IBaseLabelProvider labelProvider) {
	Assert.isTrue(labelProvider instanceof ILabelProvider);
	super.setLabelProvider(labelProvider);
}
/* (non-Javadoc)
 * Method declared in AbstractTreeViewer.
 */
protected void setSelection(List items) {
	
	Item[] current = getSelection(getTree());
	
	
	if(haveSameData(items,current))
		return;
	 
	TreeItem[] newItems = new TreeItem[items.size()];
	items.toArray(newItems);
	getTree().setSelection(newItems);
}
private boolean haveSameData(List items, Item[] current){