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/SelectionProviderMediator.java
private void doSelectionChanged(SelectionChangedEvent event) {
			ISelectionProvider provider= event.getSelectionProvider();
			if (provider == fViewerInFocus) {
				fireSelectionChanged();
			}
	}	
	
	private void propagateFocusChanged(Viewer viewer) {
		if (viewer != fViewerInFocus) { 
			fViewerInFocus= viewer;
			fireSelectionChanged();
		}
	}
	
	private void fireSelectionChanged() {
		if (fSelectionChangedListeners != null) {
			SelectionChangedEvent event= new SelectionChangedEvent(this, getSelection());
			
			Object[] listeners= fSelectionChangedListeners.getListeners();
			for (int i= 0; i < listeners.length; i++) {
				ISelectionChangedListener listener= (ISelectionChangedListener) listeners[i];
				listener.selectionChanged(event);
			}
		}
	}	
	
	/*
	 * @see ISelectionProvider#addSelectionChangedListener
	 */
	public void addSelectionChangedListener(ISelectionChangedListener listener) {