Bug 32906 Open (in) Type Hierarchy: expansion state is inconsistent across the modes 'show type/supertype/subtype hierarchy' [type hierarchy]
case 1: - select 'show type hierarchy' in the hierarchy view - in an editor press F4 on a class name -> 'show type hierarchy' is ok -> 'show supertype hierarchy' is collapsed -> 'show subtype hierarchy' is ok case 2: - select 'show supertype hierarchy' - in an editor press F4 on a class name -> 'show supertype hierarchy' is ok -> 'show type hierarchy' is only expanded down to the focused type, this is inconsistent with case 1 -> 'show subtype hierarchy' is collapsed case 3: - select 'show subtype hierarchy' - in an editor press F4 on a class name -> 'show subtype hierarchy' is only expanded to level 1 (which is consistent but impractical) -> 'show supertype hierarchy' is collapsed -> 'show type hierarchy' is only expanded down to the focused type, this is inconsistent with case 1
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
if (elem.getElementType() != IJavaElement.TYPE) {
			return null; 
		} else {
			return (IType) elem;
		}
	}
	
	private void internalSelectType(IMember elem, boolean reveal) {	
		TypeHierarchyViewer viewer= getCurrentViewer();
		viewer.removeSelectionChangedListener(fSelectionChangedListener);
		viewer.setSelection(elem != null ? new StructuredSelection(elem) : StructuredSelection.EMPTY, reveal);
		viewer.addSelectionChangedListener(fSelectionChangedListener);
	}
		
	/**
	 * When the input changed or the hierarchy pane becomes visible,
	 * <code>updateHierarchyViewer<code> brings up the correct view and refreshes
	 * the current tree
	 */
	private void updateHierarchyViewer(final boolean doExpand) {
		if (fInputElement == null) {
			fPagebook.showPage(fNoHierarchyShownLabel);
		} else {
			if (getCurrentViewer().containsElements() != null) {
				Runnable runnable= new Runnable() {
					public void run() {
						getCurrentViewer().updateContent(doExpand); 
					}
				};
				BusyIndicator.showWhile(getDisplay(), runnable);