Bug 32943 Hierarchy view should better group types with locked methods [type hierarchy]
Build RC1 When locking on a given method, occurrences of such a method are always listed behind subtypes, which is causing the end result to be quite hard to decode: Instead of: A +- foo() +- B +- foo() +- C +- foo() It currently displays: A +- B | +- C | | +- foo() | +- foo() +- foo() which goes backwards, when multiple sibling subtypes exist, the end result is even worse.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/HierarchyViewerSorter.java
return cat;
	}
	public boolean isSortByDefiningType() {
		return fSortByDefiningType;
	}
	public void setSortByDefiningType(boolean sortByDefiningType) {
		fSortByDefiningType= sortByDefiningType;
	}
	/* (non-Javadoc)
	 * @see org.eclipse.jface.viewers.ViewerSorter#compare(null, null, null)
	 */
	public int compare(Viewer viewer, Object e1, Object e2) {
		ITypeHierarchy hierarchy= fHierarchy.getHierarchy();
		if (fSortByDefiningType && hierarchy != null) {
			try {
				IType def1= (e1 instanceof IMethod) ? getDefiningType(hierarchy, (IMethod) e1) : null;
				IType def2= (e2 instanceof IMethod) ? getDefiningType(hierarchy, (IMethod) e2) : null;
				if (def1 != null) {
					if (def2 != null) {
						if (!def2.equals(def1)) {
							return compareInHierarchy(hierarchy, def1, def2);
						}
					} else {
						return -1;						
					}					
				} else {
					if (def2 != null) {
						return 1;
					}	
				}