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
protected void fireTreeExpanded(TreeExpansionEvent event) {
	Object[] listeners = treeListeners.getListeners();
	for (int i = 0; i < listeners.length; ++i) {
		((ITreeViewerListener) listeners[i]).treeExpanded(event);
	}
}
/**
 * Returns the auto-expand level.
 *
 * @return non-negative level, or <code>EXPAND_ALL</code> if
 *  all levels of the tree are expanded automatically
 * @see #setAutoExpandLevel
 */
public int getAutoExpandLevel() {
	return expandToLevel;
}
/**
 * Returns the SWT child items for the given SWT widget.
 *
 * @param widget the widget
 * @return the child items
 */
protected abstract Item[] getChildren(Widget widget);
/**
 * Returns whether the given SWT item is expanded or collapsed.
 *
 * @param item the item
 * @return <code>true</code> if the item is considered expanded
 * and <code>false</code> if collapsed
 */