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
TypeHierarchyViewer superTypesViewer= new SuperTypeHierarchyViewer(fViewerbook, fHierarchyLifeCycle, this);
		initializeTypesViewer(superTypesViewer, keyListener, IContextMenuConstants.TARGET_ID_SUPERTYPES_VIEW);
		
		TypeHierarchyViewer subTypesViewer= new SubTypeHierarchyViewer(fViewerbook, fHierarchyLifeCycle, this);
		initializeTypesViewer(subTypesViewer, keyListener, IContextMenuConstants.TARGET_ID_SUBTYPES_VIEW);
		
		TypeHierarchyViewer vajViewer= new TraditionalHierarchyViewer(fViewerbook, fHierarchyLifeCycle, this);
		initializeTypesViewer(vajViewer, keyListener, IContextMenuConstants.TARGET_ID_HIERARCHY_VIEW);
		fAllViewers= new TypeHierarchyViewer[3];
		fAllViewers[VIEW_ID_SUPER]= superTypesViewer;
		fAllViewers[VIEW_ID_SUB]= subTypesViewer;
		fAllViewers[VIEW_ID_TYPE]= vajViewer;
		
		int currViewerIndex;
		try {
			currViewerIndex= fDialogSettings.getInt(DIALOGSTORE_HIERARCHYVIEW);
			if (currViewerIndex < 0 || currViewerIndex > 2) {
				currViewerIndex= VIEW_ID_TYPE;
			}
		} catch (NumberFormatException e) {
			currViewerIndex= VIEW_ID_TYPE;
		}
			
		fEmptyTypesViewer= new Label(fViewerbook, SWT.LEFT);
		
		for (int i= 0; i < fAllViewers.length; i++) {
			fAllViewers[i].setInput(fAllViewers[i]);
		}