Bug 108102 [Viewers] Project expands in wrong working set
I am using "Show->Working Sets" in the package explorer. Some of the working sets contain the same project: Working Set-1: - Project-A - Project-B - Project-C Working Set-2: - Project-B - Project-C - Project-D If I now double-click "Working Set-1.Project-B" "Project-B" in working set "Working Set-2" will be expanded. If the working set "Working Set-2" itself is not expanded it will seem as if nothing happens, but after expanding "Working Set-2" one can see the changed state of the project. Double-clicking "Working Set-2.Project-B" works as expected.
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewer.java
}
	}
	/**
	 * Handles an invalid selection.
	 * <p>
	 * This framework method is called if a model change picked up by a viewer
	 * results in an invalid selection. For instance if an element contained in
	 * the selection has been removed from the viewer, the viewer is free to
	 * either remove the element from the selection or to pick another element
	 * as its new selection. The default implementation of this method calls
	 * <code>updateSelection</code>. Subclasses may override it to implement
	 * a different strategy for picking a new selection when the old selection
	 * becomes invalid.
	 * </p>
	 * 
	 * @param invalidSelection
	 *            the selection before the viewer was updated
	 * @param newSelection
	 *            the selection after the update, or <code>null</code> if none
	 */
	protected void handleInvalidSelection(ISelection invalidSelection, ISelection newSelection) {
		updateSelection(newSelection);
		SelectionChangedEvent event = new SelectionChangedEvent(this, newSelection);
		firePostSelectionChanged(event);
	}
	/**
	 * The <code>StructuredViewer</code> implementation of this
	 * <code>ContentViewer</code> method calls <code>update</code> if the
	 * event specifies that the label of a given element has changed, otherwise
	 * it calls super. Subclasses may reimplement or extend.