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/TypeHierarchyViewPart.java
};		
	}
	
	private void initializeTypesViewer(final TypeHierarchyViewer typesViewer, ISelectionChangedListener selectionChangedListener, KeyListener keyListener, String cotextHelpId) {
		typesViewer.getControl().setVisible(false);
		typesViewer.getControl().addKeyListener(keyListener);
		typesViewer.initContextMenu(new IMenuListener() {
			public void menuAboutToShow(IMenuManager menu) {
				fillTypesViewerContextMenu(typesViewer, menu);
			}
		}, cotextHelpId,	getSite());
		typesViewer.addSelectionChangedListener(selectionChangedListener);
	}
	
	private Control createMethodViewerControl(Composite parent) {
		fMethodsViewer= new MethodsViewer(parent, this);
		fMethodsViewer.initContextMenu(new IMenuListener() {
			public void menuAboutToShow(IMenuManager menu) {
				fillMethodsViewerContextMenu(menu);
			}
		}, IContextMenuConstants.TARGET_ID_MEMBERS_VIEW, getSite());
		fMethodsViewer.addSelectionChangedListener(new ISelectionChangedListener() {
			public void selectionChanged(SelectionChangedEvent event) {
				methodSelectionChanged(event.getSelection());
			}
		});
		Control control= fMethodsViewer.getTable();
		control.addKeyListener(createKeyListener());
		
		JavaPlugin.getDefault().getProblemMarkerManager().addListener(fMethodsViewer);