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 abstract void setExpanded(Item item, boolean expand);
/**
 * Sets which nodes are expanded in this viewer's tree.
 * The given list contains the elements that are to be expanded;
 * all other nodes are to be collapsed.
 * <p>
 * This method is typically used when restoring the interesting
 * state of a viewer captured by an earlier call to <code>getExpandedElements</code>.
 * </p>
 *
 * @param elements the array of expanded elements
 * @see #getExpandedElements
 */
public void setExpandedElements(Object[] elements) {
	HashSet expandedElements = new HashSet(elements.length*2+1);
	for (int i = 0; i < elements.length; ++i) {
		
		internalExpand(elements[i], false);
		expandedElements.add(elements[i]);
	}
	internalSetExpanded(expandedElements, getControl());
}
/**
 * Sets whether the node corresponding to the given element is expanded or collapsed.
 *
 * @param element the element
 * @param expanded <code>true</code> if the node is expanded, and <code>false</code> if collapsed
 */
public void setExpandedState(Object element, boolean expanded) {