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
boolean removeAll = false;
	boolean addDummy = false;
	Object data = item.getData();
	if (data != null && element.equals(data)) {
		
		if (hasPlus != needsPlus) {
			if (needsPlus)
				addDummy = true;
			else
				removeAll = true;
		}
	} else {
		
		removeAll = true;
		addDummy = needsPlus;
		
		setExpanded(item, false);
	}
	if (removeAll) {
		
		Item[] items = getItems(item);
		for (int i = 0; i < items.length; i++) {
			if (items[i].getData() != null)
				disassociate(items[i]);
			items[i].dispose();
		}
	}
	if (addDummy)
		newItem(item, SWT.NULL, -1); 
}