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
setTitle(title);
		setTitleToolTip(tooltip);
	}
	
	private void updateToolbarButtons() {
		boolean isType= fInputElement instanceof IType;
		for (int i= 0; i < fViewActions.length; i++) {
			ToggleViewAction action= fViewActions[i];
			if (action.getViewerIndex() == VIEW_ID_TYPE) {
				action.setEnabled(fInputElement != null);
			} else {
				action.setEnabled(isType);
			}
		}
	}
		
	/**
	 * Sets the current view (see view id)
	 * called from ToggleViewAction. Must be called after creation of the viewpart.
	 */	
	public void setView(int viewerIndex) {
		Assert.isNotNull(fAllViewers);
		if (viewerIndex < fAllViewers.length && fCurrentViewerIndex != viewerIndex) {			
			fCurrentViewerIndex= viewerIndex;
			
			updateHierarchyViewer(false);
			if (fInputElement != null) {
				ISelection currSelection= getCurrentViewer().getSelection();
				if (currSelection == null || currSelection.isEmpty()) {
					internalSelectType(getSelectableType(fInputElement), false);