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
public void setUseHashlookup(boolean enable) {
	Assert.isTrue(getInput() == null, "Can only enable the hash look up before input has been set");
	if (enable) {
		elementMap= new HashMap();
	} else {
		elementMap= null;
	}	
}
/**
 * Hook for testing.
 */
public Widget testFindItem(Object element) {
	return findItem(element);
}
/**
 * Removes all elements from the map
 * <p>
 * This method is internal to the framework; subclassers should not call
 * this method.
 * </p>
 */
protected void unmapAllElements() {
	if (elementMap != null) {
		elementMap = new HashMap();
	}
}
/**
 * Removes the given element from the internal element to widget map.
 * Does nothing if mapping is disabled.
 * If mapping is enabled, the given element must be present.