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
private TypeHierarchyLifeCycle fHierarchy;
	private boolean fSortByDefiningType;
	
	public HierarchyViewerSorter(TypeHierarchyLifeCycle cycle) {
		fHierarchy= cycle;
	}
	
	/* (non-Javadoc)
	 * @see org.eclipse.jface.viewers.ViewerSorter#category(java.lang.Object)
	 */
	public int category(Object element) {
		int cat= super.category(element) * 2;
		if (element instanceof IType) {
			ITypeHierarchy hierarchy= fHierarchy.getHierarchy();
			
			if (hierarchy != null) {
				IType type= (IType) JavaModelUtil.toOriginal((IType) element);
				if (Flags.isInterface(hierarchy.getCachedFlags(type))) {
					cat++;
				}
			}
		}