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
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPartListener2;
import org.eclipse.ui.IViewSite;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchPartReference;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.actions.ActionContext;
import org.eclipse.ui.actions.ActionGroup;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.ui.part.IShowInSource;
import org.eclipse.ui.part.IShowInTargetList;
import org.eclipse.ui.part.PageBook;
import org.eclipse.ui.part.ShowInContext;
import org.eclipse.ui.part.ViewPart;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.ITypeHierarchy;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.ui.IContextMenuConstants;
import org.eclipse.jdt.ui.ITypeHierarchyViewPart;
import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.jdt.ui.PreferenceConstants;