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.ui.views/src/org/eclipse/ui/views/contentoutline/ContentOutlinePage.java
pageSite.setSelectionProvider(this);
}
/* (non-Javadoc)
 * Method declared on ISelectionProvider.
 */
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
	selectionChangedListeners.remove(listener);
}
/* (non-Javadoc)
 * Method declared on ISelectionChangeListener.
 * Gives notification that the tree selection has changed.
 */
public void selectionChanged(SelectionChangedEvent event) {
	fireSelectionChanged(event.getSelection());
}
/**
 * Sets focus to a part in the page.
 */
public void setFocus() {
	treeViewer.getControl().setFocus();
}
/* (non-Javadoc)
 * Method declared on ISelectionProvider.
 */
public void setSelection(ISelection selection) {
	if (treeViewer != null) 
		treeViewer.setSelection(selection);
}
}