Bug 8581 Switch J Search to StructuredContentProvider
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/GotoMarkerAction.java
showInEditor(marker, wbPage, new FileEditorInput((IFile)resource), JavaUI.ID_CU_EDITOR);
		}
		else {
			IClassFile cf= getClassFile(javaElement);
			if (cf != null)
				showInEditor(marker, wbPage, new InternalClassFileEditorInput(cf), JavaUI.ID_CF_EDITOR);
		}
	}
	private void showInEditor(IMarker marker, IWorkbenchPage page, IEditorInput input, String editorId) {
		IEditorPart editor= null;
		IEditorPart[] editorParts= page.getEditors();
		for (int i= 0; i < editorParts.length; i++) {
			IEditorPart part= editorParts[i];
			if (input.equals(part.getEditorInput())) {
				editor= part;
				break;
			}
		}
		if (editor == null) {
			if (fEditor != null && !fEditor.isDirty())
					page.closeEditor(fEditor, false);
			try {
				editor= page.openEditor(input, editorId, false);
			} catch (PartInitException ex) {
				ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.openEditor.title"), SearchMessages.getString("Search.Error.openEditor.message")); 
				return;
			}
		} else {
			page.bringToTop(editor);
		}