Bug 24124 Opening hierarchy on method shows <Unknown Label>
Build 20020924 1. Preferences->Workbench->Perspectives->Open a new perspective->In a new window 2. Perefereces->Java->When opening a Type Hierarchy->Open a new Type Hierarchy Perspective 3. Create the following cu: public class X { void foo() { } } 4. In Outline select foo 5. Open type hierarchy Observe: A new window opens but its title starts with <Unknown Label>
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/OpenTypeHierarchyUtil.java
}
		}
		IWorkbenchPage page= workbench.showPerspective(JavaUI.ID_HIERARCHYPERSPECTIVE, window, input);
		if (input instanceof IMember) {
			openEditor(input);
		}
		return (TypeHierarchyViewPart)page.showView(JavaUI.ID_TYPE_HIERARCHY);
	}
	private static void openEditor(Object input) throws PartInitException, JavaModelException {
		IEditorPart part= EditorUtility.openInEditor(input, true);
		if (input instanceof IJavaElement)
			EditorUtility.revealInEditor(part, (IJavaElement) input);
	}
	
	private static IWorkbenchPage findPage(IWorkbenchWindow window) {
		IPerspectiveRegistry registry= PlatformUI.getWorkbench().getPerspectiveRegistry();
		IPerspectiveDescriptor pd= registry.findPerspectiveWithId(JavaUI.ID_HIERARCHYPERSPECTIVE);
		IWorkbenchPage pages[]= window.getPages();
		for (int i= 0; i < pages.length; i++) {
			IWorkbenchPage page= pages[i];
			if (page.getPerspective().equals(pd))
				return page;
		}
		return null;
	}
	
	private static Object getElement(ISelection s) {
		if (!(s instanceof IStructuredSelection))
			return null;
		IStructuredSelection selection= (IStructuredSelection)s;