}
public IEditorPart openAndSelect(IWorkbenchPage wbPage, IFile file, int offset, int length, boolean activate)
throws PartInitException {
String editorId = null;
IEditorDescriptor desc = IDE.getEditorDescriptor(file);
if (desc == null || !desc.isInternal()) {
editorId = "org.eclipse.ui.DefaultTextEditor"; //$NON-NLS-1$
} else {
editorId = desc.getId();
}
IEditorPart editor;
if (NewSearchUI.reuseEditor()) {
editor = showWithReuse(file, wbPage, editorId, activate);