if (!(editor instanceof ITextEditor)) return; ITextEditor textEditor= (ITextEditor) editor; textEditor.selectAndReveal(offset, length);
if (!(editor instanceof ITextEditor)) { if (element instanceof IFile) { IFile file= (IFile) element; showWithMarker(editor, file, offset, length); } } else { ITextEditor textEditor= (ITextEditor) editor; textEditor.selectAndReveal(offset, length); }
	public void showMatch(Object element, int offset, int length) throws PartInitException {		IEditorPart editor= null;		if (element instanceof IJavaElement) {			IJavaElement javaElement= (IJavaElement) element;			try {				editor= EditorUtility.openInEditor(javaElement, false);			} catch (PartInitException e1) {				return;			} catch (JavaModelException e1) {				return;			}		} else if (element instanceof IFile) {			editor= IDE.openEditor(JavaPlugin.getActivePage(), (IFile) element, false);		}		if (!(editor instanceof ITextEditor))			return;		ITextEditor textEditor= (ITextEditor) editor;		textEditor.selectAndReveal(offset, length);	}