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/StructuredViewer.java
* in the viewer widget changes.
 * </p>
 * <p>
 * The default implementation of this method notifies all 
 * selection change listeners recorded in an internal state variable.
 * Overriding this method is generally not required; 
 * however, if overriding in a subclass, 
 * <code>super.updateSelection</code> must be invoked.
 * </p>
 * @param selection the selection, or <code>null</code> if none
 */
protected void updateSelection(ISelection selection) {
	SelectionChangedEvent event = new SelectionChangedEvent(this, selection);
	fireSelectionChanged(event);
}
/**
 * Returns whether this structured viewer is configured to use an internal
 * map to speed up the mapping between elements and SWT items.
 * <p>
 * The default implementation of this framework method checks whether the
 * internal map has been initialized.
 * </p>
 *
 * @return <code>true</code> if the element map is enabled, and <code>false</code> if disabled
 */
protected boolean usingElementMap() {
	return elementMap != null;
}    
}