Bug 78733 ITypeHierarchyViewPart.setInputElement() does not select methods
If you pass an IMethod to the ITypeHierarchyViewPart.setInputElement (IJavaElement element) it does not select the method like the normal "F4" in the Java Editor does. My use case is as follows: Properties p = new Properties(); p.getProperty("foo"); Where Properties is java.util.Properties and you try to "F4" (an action implemented using ITypeHierarchyViewPart) the getProperty method. I'm using Eclipse 3.0.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
Control methodControl= fMethodsViewer.getControl();
			if (methodControl != null && !methodControl.isDisposed()) {
				methodControl.setFocus();
			}
			fMethodsViewer.setSelection(new StructuredSelection(member), true);
		} else {
			Control viewerControl= getCurrentViewer().getControl();
			if (viewerControl != null && !viewerControl.isDisposed()) {
				viewerControl.setFocus();
			}
			
			if (!member.equals(fSelectedType)) {
				getCurrentViewer().setSelection(new StructuredSelection(member), true);
			}
		}
		fSelectInEditor= true;
	}
	/**
	 * @return The input type
	 * @deprecated
	 */	
	public IType getInput() {
		if (fInputElement instanceof IType) {
			return (IType) fInputElement;
		}
		return null;
	}
	
	/**
	 * Sets the input to a new type