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/Viewer.java
* Method declared on ISelectionProvider.
 */
public void addSelectionChangedListener(ISelectionChangedListener listener) {
	selectionChangedListeners.add(listener);
}
/**
 * Notifies any help listeners that help has been requested.
 * Only listeners registered at the time this method is called are notified.
 *
 * @param event a help event
 *
 * @see HelpListener#helpRequested
 */
protected void fireHelpRequested(HelpEvent event) {
	Object[] listeners = helpListeners.getListeners();
	for (int i = 0; i < listeners.length; ++i) {
		((HelpListener) listeners[i]).helpRequested(event);
	}
}
/**
 * Notifies any selection changed listeners that the viewer's selection has changed.
 * Only listeners registered at the time this method is called are notified.
 *
 * @param event a selection changed event
 *
 * @see ISelectionChangedListener#selectionChanged
 */
protected void fireSelectionChanged(SelectionChangedEvent event) {
	Object[] listeners = selectionChangedListeners.getListeners();
	for (int i = 0; i < listeners.length; ++i) {