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
for (int i = 0, n = filters.size(); i < n; ++i) {
			ViewerFilter filter = (ViewerFilter) filters.get(i);
			if (filter.isFilterProperty(element, property))
				return true;
		}
	}
	return false;
}
/**
 * Attempts to preserves the current selection across a run of
 * the given code.
 * <p>
 * The default implementation of this method:
 * <ul>
 *  <li>discovers the old selection (via <code>getSelection</code>)</li>
 *  <li>runs the given runnable</li>
 *  <li>attempts to restore the old selection
 *    (using <code>setSelectionToWidget</code></li>
 *  <li>rediscovers the resulting selection (via <code>getSelection</code>)</li>
 *  <li>calls <code>handleInvalidSelection</code> if the selection
 *    did not take</li>
 *  <li>calls <code>postUpdateHook</code></li>
 * </ul>
 * </p>
 *
 * @param updateCode the code to run
 */
protected void preservingSelection(Runnable updateCode) {
	
	ISelection oldSelection= null;