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
TreePath path;
		if (sorter instanceof TreePathViewerSorter && parent instanceof Item) {
			Item item = (Item) parent;
			path = getTreePathFromItem(item);
		} else {
			path = null;
		}
		return path;
	}
	/**
	 * Compare the two elements using the given sorter. If the
	 * sorter is a {@link TreePathViewerSorter}, the provided
	 * tree path will be used. If the tree path is null and the
	 * sorter is a tree path sorter, then the elements are root elements
	 * @param sorter the sorter
	 * @param parentPath the path of the elements' parent
	 * @param e1 the first element
	 * @param e2 the seocnd element
	 * @return the result of comparing the two elements
	 */
	private int internalCompare(ViewerSorter sorter, TreePath parentPath, Object e1, Object e2) {
		if (sorter instanceof TreePathViewerSorter) {
			TreePathViewerSorter tpvs = (TreePathViewerSorter) sorter;
			return tpvs.compare(this, parentPath, e1, e2);
		}
		return sorter.compare(this, e1, e2);
	}
	
	/* (non-Javadoc)
	 * @see org.eclipse.jface.viewers.StructuredViewer#getSortedChildren(java.lang.Object)