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/AbstractTreeViewer.java
if (paths[0].getSegmentCount() == 0) {
					return getInput();
				}
				return paths[0].getLastSegment();
			}
		}
        if (cp instanceof ITreeContentProvider) {
        	ITreeContentProvider tcp = (ITreeContentProvider) cp;
        	return tcp.getParent(elementOrTreePath);
        }
        return null;
	}
	/**
     * Returns the widget to be selected for the given element or tree path.
     * 
     * @param elementOrTreePath the element or tree path to select
     * @return the widget to be selected, or <code>null</code> if not found
     * 
     * @since 3.1
     */
	protected Widget internalGetWidgetToSelect(Object elementOrTreePath) {
		if(elementOrTreePath instanceof TreePath) {
			TreePath treePath = (TreePath) elementOrTreePath;
			if(treePath.getSegmentCount()==0) {
				return null;
			}
			Widget[] candidates = findItems(treePath.getLastSegment());
			for (int i = 0; i < candidates.length; i++) {
				Widget candidate = candidates[i];
				if(!(candidate instanceof Item)) {