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
if (decl.isOnDemand()) {
						elem= JavaModelUtil.findTypeContainer(elem.getJavaProject(), Signature.getQualifier(elem.getElementName()));
					} else {
						elem= elem.getJavaProject().findType(elem.getElementName());
					}
					if (elem == null)
						return null;
					return new IJavaElement[] {elem};
					
				case IJavaElement.CLASS_FILE:
					return new IJavaElement[] { ((IClassFile)input).getType() };				
				case IJavaElement.COMPILATION_UNIT: {
						ICompilationUnit cu= (ICompilationUnit) elem.getAncestor(IJavaElement.COMPILATION_UNIT);
					if (cu != null) {
						IType[] types= cu.getTypes();
						if (types.length > 0) {
							return types;
						}
					}
					break;
				}					
				default:
			}
		} catch (JavaModelException e) {
			JavaPlugin.log(e);
		}
		return null;	
	}	
}