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
if (Flags.isInterface(flags1)) {
			if (!Flags.isInterface(flags2)) {
				return 1;
			}
		} else if (Flags.isInterface(flags2)) {
			return -1;
		}
		String name1= def1.getElementName();
		String name2= def2.getElementName();
		
		return getCollator().compare(name1, name2);
	}
	private boolean isSuperType(ITypeHierarchy hierarchy, IType def1, IType def2) {
		IType superType= hierarchy.getSuperclass(def1);
		if (superType != null) {
			if (superType.equals(def2) || isSuperType(hierarchy, superType, def2)) {
				return true;
			}
		}
		IType[] superInterfaces= hierarchy.getAllSuperInterfaces(def1);
		for (int i= 0; i < superInterfaces.length; i++) {
			IType curr= superInterfaces[i];
			if (curr.equals(def2) || isSuperType(hierarchy, curr, def2)) {
				return true;
			}		
		}
		return false;
	}
}