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/TraditionalHierarchyViewer.java
}
		
		private int getDepth(ITypeHierarchy hierarchy, IType input) {
			int count= 0;
			IType superType= hierarchy.getSuperclass(input);
			while (superType != null) {
				count++;
				superType= hierarchy.getSuperclass(superType);
			}
			return count;
		}
		
		/* (non-Javadoc)
		 * @see org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyContentProvider#getRootTypes(java.util.List)
		 */
		protected final void getRootTypes(List res) {
			ITypeHierarchy hierarchy= getHierarchy();
			if (hierarchy != null) {
				IType input= hierarchy.getType();
				if (input == null) {
					IType[] classes= hierarchy.getRootClasses();
					for (int i= 0; i < classes.length; i++) {
						res.add(classes[i]);
					}
					IType[] interfaces= hierarchy.getRootInterfaces();
					for (int i= 0; i < interfaces.length; i++) {
						res.add(interfaces[i]);
					}
				} else {
					if (Flags.isInterface(hierarchy.getCachedFlags(input))) {