Bug 5475 F4 causes loss of context when called from a method view
1) Open a class with many methods 2) Make sure "show of source element only" is selected 3) Choose a method 4) Press F4 with no selection The class is open on the hierarchy view and the full source is shown in the editor. The method focus was lost. You have to find and select the method again.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewer.java
menu.appendToGroup(IContextMenuConstants.GROUP_SHOW, fShowInPackageViewAction);
		ContextMenuGroup.add(menu, fStandardGroups, this);
	}
	/**
	 * Set the member filter
	 */
	public void setMemberFilter(IMember[] memberFilter) {
		getHierarchyContentProvider().setMemberFilter(memberFilter);
	}
	/**
	 * Returns if method filtering is enabled.
	 */	
	public boolean isMethodFiltering() {
		return getHierarchyContentProvider().getMemberFilter() != null;
	}
		
	/**
	 * Returns true if the hierarchy contains elements. Returns one of them
	 * With member filtering it is possible that no elements are visible
	 */ 
	public Object containsElements() {
		Object[] elements=  ((IStructuredContentProvider)getContentProvider()).getElements(null);
		if (elements.length > 0) {
			return elements[0];
		}
		return null;
	}