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/CheckboxTableViewer.java
* Method declared on Viewer.
 */
protected void preservingSelection(Runnable updateCode) {
	TableItem[] children = getTable().getItems();
	Set checked = new HashSet(children.length);
	Set grayed = new HashSet(children.length);
	for (int i = 0; i < children.length; i++) {
		TableItem item = children[i];
		Object data = item.getData();
		if (data != null) {
			if (item.getChecked())
				checked.add(data);
			if (item.getGrayed())
				grayed.add(data);
		}
	}
	super.preservingSelection(updateCode);
	children = getTable().getItems();
	for (int i = 0; i < children.length; i++) {
		TableItem item = children[i];
		Object data = item.getData();
		if (data != null) {
			item.setChecked(checked.contains(data));
			item.setGrayed(grayed.contains(data));
		}
	}
}
/* (non-Javadoc)
 * Method declared on ICheckable.
 */