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
* Recursively collects all expanded elements from the given widget.
 *
 * @param result a list (element type: <code>Object</code>) into which
 *    to collect the elements
 * @param widget the widget
 */
private void internalCollectExpanded(List result, Widget widget) {
	Item[] items = getChildren(widget);
	for (int i = 0; i < items.length; i++) {
		Item item = items[i];
		if (getExpanded(item)) {
			Object data = item.getData();
			if (data != null)
				result.add(data);
		}
		internalCollectExpanded(result, item);
	}
}
/**
 * Tries to create a path of tree items for the given element.
 * This method recursively walks up towards the root of the tree
 * and assumes that <code>getParent</code> returns the correct
 * parent of an element.
 *
 * @param element the element
 * @param expand <code>true</code> if all nodes on the path should be expanded, 
 *    and <code>false</code> otherwise
 */
protected Widget internalExpand(Object element, boolean expand) {
	if (element == null)