IEditorPart editor= null; if (match.getElement() instanceof IJavaElement) { IJavaElement javaElement= (IJavaElement) match.getElement(); try { editor= EditorUtility.openInEditor(javaElement, false); } catch (PartInitException e1) { return; } catch (JavaModelException e1) { return;
try { IEditorPart editor= fEditorOpener.open(match); if (editor instanceof ITextEditor) { ITextEditor textEditor= (ITextEditor) editor; textEditor.selectAndReveal(currentOffset, currentLength);
	protected void showMatch(Match match, int currentOffset, int currentLength) throws PartInitException {		IEditorPart editor= null;		if (match.getElement() instanceof IJavaElement) {			IJavaElement javaElement= (IJavaElement) match.getElement();			try {				editor= EditorUtility.openInEditor(javaElement, false);			} catch (PartInitException e1) {				return;			} catch (JavaModelException e1) {				return;			}		} else if (match.getElement() instanceof FileEntry) {			FileEntry fileEntry= (FileEntry) match.getElement();			IFile file= fileEntry.getPropertiesFile();			editor= IDE.openEditor(JavaPlugin.getActivePage(), file, false);		}				if (editor instanceof ITextEditor) {			ITextEditor textEditor= (ITextEditor) editor;			textEditor.selectAndReveal(currentOffset, currentLength);		}	}