Bug 120673 [hierarchy] on anonymous interface does not include focus type
I20051213-0010, same in 3.1 The type hierarchies on new Cloneable(){} and new Object(){} do not include the anonymous type itself. IMO, the focus type should always be shown in the hierarchy. Supertype hierarchy is fine. class Type { void m() { new Cloneable() {}; // Type Hier. is only Object new Object() {}; // Type Hier. is only Object new Thread() {}; // Type Hier. is fine } }
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyContentProvider.java
if (fMethodOverrideTester == null || !fMethodOverrideTester.getFocusType().equals(focusType)) {
			fMethodOverrideTester= new MethodOverrideTester(focusType, hierarchy);
		}
		return filterOverrides;
	}
	
	private void addCompatibleMethods(IMethod filterMethod, IType typeToFindIn, List children) throws JavaModelException {
		boolean filterMethodOverrides= initializeMethodOverrideTester(filterMethod, typeToFindIn);
		IMethod[] methods= typeToFindIn.getMethods();
		for (int i= 0; i < methods.length; i++) {
			IMethod curr= methods[i];
			if (isCompatibleMethod(filterMethod, curr, filterMethodOverrides) && !children.contains(curr)) {
				children.add(curr);
			}
		}
	}
	
	private boolean hasCompatibleMethod(IMethod filterMethod, IType typeToFindIn) throws JavaModelException {
		boolean filterMethodOverrides= initializeMethodOverrideTester(filterMethod, typeToFindIn);
		IMethod[] methods= typeToFindIn.getMethods();
		for (int i= 0; i < methods.length; i++) {
			if (isCompatibleMethod(filterMethod, methods[i], filterMethodOverrides)) {
				return true;
			}
		}
		return false;
	}
	
	private boolean isCompatibleMethod(IMethod filterMethod, IMethod method, boolean filterOverrides) throws JavaModelException {