Bug 139385 [Viewers] Viewer#setComparator(ViewerComparator) has no effect
Version: 3.2.0 Build id: I20060428-1315 Setting a Comparator in setComparator is actually not triggering any sorting in my viewer. It works when I call setComparator(ViewerSorter). Any ideas? Ben
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)