Bug 31897 Hierarchy View expands all treeitems on save
I have a hierarchy perspective open rooted on a package. Whenever I save a CU in the package, the entire hierarchy view Tree is expanded.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
private static final String TAG_SHOWINHERITED= "showinherited";		 
	private static final String TAG_SORTBYDEFININGTYPE= "sortbydefiningtype";		 
	private static final String TAG_VERTICAL_SCROLL= "mv_vertical_scroll";		 
	
	private static final int LABEL_BASEFLAGS= AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS;
	
	private HierarchyLabelProvider fLabelProvider;
	
	private MemberFilterActionGroup fMemberFilterActionGroup;
	
	private OpenAction fOpen;
	private ShowInheritedMembersAction fShowInheritedMembersAction;
	private SortByDefiningTypeAction fSortByDefiningTypeAction;
	
	public MethodsViewer(Composite parent, final TypeHierarchyLifeCycle lifeCycle, IWorkbenchPart part) {
		super(new Table(parent, SWT.MULTI));
		
		fLabelProvider= new HierarchyLabelProvider(lifeCycle);
	
		setLabelProvider(new DecoratingJavaLabelProvider(fLabelProvider, true, false));
		setContentProvider(new MethodsContentProvider(lifeCycle));
		
		HierarchyViewerSorter sorter= new HierarchyViewerSorter(lifeCycle);
		sorter.setSortByDefiningType(false);
		setSorter(sorter);
		
		fOpen= new OpenAction(part.getSite());