Bug 51345 double clicking a search result leaves focus on search pane instead of editor
double clicking a search result should set focus to the editor pane as per double clicking a 'problem'. this assists rapid development as the developer can start editing the search result without manually changing focus. changing focus would not limit any user either as the search pane is most commonly used with a mouse.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchEditorOpener.java
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IEditorReference;
import org.eclipse.ui.IEditorRegistry;
import org.eclipse.ui.IReusableEditor;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.ide.IDE;
import org.eclipse.ui.part.FileEditorInput;
public class JavaSearchEditorOpener {
	private IEditorPart fEditor;
	public IEditorPart open(Match match) throws PartInitException, JavaModelException {
		IWorkbenchPage wbPage= JavaPlugin.getActivePage();
		Object element= getElementToOpen(match);
		if (SearchUI.reuseEditor())
			return showWithReuse(element, wbPage);
		else
			return showWithoutReuse(element, wbPage);
	}
	protected Object getElementToOpen(Match match) {
		return match.getElement();
	}
	private IEditorPart showWithoutReuse(Object element, IWorkbenchPage wbPage) throws PartInitException, JavaModelException {
		IEditorPart editor= null;
		return EditorUtility.openInEditor(element, false);
	}
	private IEditorPart showWithReuse(Object element, IWorkbenchPage wbPage) throws JavaModelException {
		IFile file= getFile(element);
		if (file != null) {
			String editorID= getEditorID(file);