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
* Associates the given element with the given widget.
 * Sets the given item's data to be the element, and maps
 * the element to the item in the element map (if enabled).
 *
 * @param element the element
 * @param item the widget
 */
protected void associate(Object element, Item item) {
	Object data = item.getData();
	if (data != element) {
		if (data != null)
			disassociate(item);
		item.setData(element);
	}
	
	
	
	mapElement(element, item);
}
/**
 * Disassociates the given SWT item from its corresponding element.
 * Sets the item's data to <code>null</code> and removes the element
 * from the element map (if enabled).
 *
 * @param item the widget
 */
protected void disassociate(Item item) {
	Object element = item.getData();
	Assert.isNotNull(element);
	item.setData(null);