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/AbstractTreeViewer.java
*/
protected void createTreeItem(Widget parent, Object element, int index) {
	Item item = newItem(parent, SWT.NULL, index);
	updateItem(item, element);
	updatePlus(item, element);
}
/**
 * The <code>AbstractTreeViewer</code> implementation of this method
 * also recurses over children of the corresponding element.
 */
protected void disassociate(Item item) {
	super.disassociate(item);
	
	
	
	if (usingElementMap())
		disassociateChildren(item);
}
/**
 * Disassociates the children of the given SWT item from their
 * corresponding elements.
 *
 * @param item the widget
 */
private void disassociateChildren(Item item) {
	Item[] items = getChildren(item);
	for (int i = 0; i < items.length; i++) {
		if (items[i].getData() != null)
			disassociate(items[i]);
	}