if (editor == null) { if (fEditor != null && !fEditor.isDirty() && !isPinned(fEditor))
if (editor != null) page.bringToTop(editor); else { boolean isOpen= false; if (fEditor != null) { IEditorReference[] parts= page.getEditorReferences(); int i= 0; while (!isOpen && i < parts.length) isOpen= fEditor == parts[i++].getEditor(false); }  boolean canBeReused= isOpen && !fEditor.isDirty() && !isPinned(fEditor); boolean showsSameInputType= fEditor != null && fEditor.getSite().getId().equals(editorId); if (canBeReused && !showsSameInputType) {
	private void showInEditor(IMarker marker, IWorkbenchPage page, IEditorInput input, String editorId) {		IEditorPart editor= page.findEditor(input);		if (editor == null) {			if (fEditor != null && !fEditor.isDirty() && !isPinned(fEditor))				page.closeEditor(fEditor, false);				try {					editor= page.openEditor(input, editorId, false);				} catch (PartInitException ex) {					MessageDialog.openError(SearchPlugin.getActiveWorkbenchShell(), SearchMessages.getString("Search.Error.openEditor.title"), SearchMessages.getString("Search.Error.openEditor.message")); //$NON-NLS-2$ //$NON-NLS-1$					return;				}		} else {			page.bringToTop(editor);		}		if (editor != null) {			editor.gotoMarker(marker);			fEditor = editor;		}	}