Bug 37886 Show type hierarchy cancel ends up with empty dialog
1) open type hierarchy on object 2) cancel ->the search is cancelled but an empty dialog is showing up.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/HierarchyInformationControl.java
case IJavaElement.CLASS_FILE :
					input= ((IClassFile) elem).getType();
					break;
				case IJavaElement.METHOD :
					IMethod curr= (IMethod) elem;
					if (!curr.isConstructor()) {
						IType declaring= curr.getDeclaringType();
						ITypeHierarchy hierarchy= declaring.newSupertypeHierarchy(null);
						IMethod method= JavaModelUtil.findMethodDeclarationInHierarchy(hierarchy, declaring, curr.getElementName(), curr.getParameterTypes(), false);
						if (method != null) {
							input= method.getDeclaringType();
							locked= method;
						} else {
							locked= curr;
							input= declaring;
						}
					}
				case IJavaElement.FIELD :
				case IJavaElement.INITIALIZER :
					input= ((IMember) elem).getDeclaringType();
					break;
				case IJavaElement.PACKAGE_DECLARATION :
					input= elem.getParent().getParent();
					break;
				case IJavaElement.IMPORT_DECLARATION :
					IImportDeclaration decl= (IImportDeclaration) elem;
					if (decl.isOnDemand()) {
						input= JavaModelUtil.findTypeContainer(decl.getJavaProject(), Signature.getQualifier(decl.getElementName()));
					} else {
						input= decl.getJavaProject().findType(decl.getElementName());