Bug 15844 [Exception Handling] SelectionChange events and NPE
Build 20020508 Due to new global actions there are now more objects listening to selection changes send out by a JFace viewer. We now had the case that one of the listener generated a NPE. As a result all listeners registered after that one didn't receive the selection change event. StructuredViewers should be more fault tolorant to exceptions when informing listeners.
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractTreeViewer.java
int oldCnt= -1;
	if (widget == tree)
		oldCnt= getItemCount(tree);
	Item[] items = getChildren(widget);
	
	
	HashSet expanded = new HashSet(); 
	for (int i = 0; i < items.length; ++i) {
		if (getExpanded(items[i])) {
			Object element = items[i].getData();
			if (element != null) {
				expanded.add(element);
			}
		}
	}
	
	int min = Math.min(elementChildren.length, items.length);
	
	 
	
	
	
	for (int i = items.length; --i >= min;) {
		if (items[i].getData() != null) {
			disassociate(items[i]);
		}
		items[i].dispose();
	}