@Override
  public IEditorDescriptor getEditorDescriptor(String name, IEditorRegistry editorReg) {
    IEditorDescriptor editorDesc = null;
    // next check the OS for in-place editor (OLE on Win32)
    if (editorReg.isSystemInPlaceEditorAvailable(name)) {
      editorDesc = editorReg.findEditor(IEditorRegistry.SYSTEM_INPLACE_EDITOR_ID);
    }

    // next check with the OS for an external editor
    if (editorDesc == null && editorReg.isSystemExternalEditorAvailable(name)) {
      editorDesc = editorReg.findEditor(IEditorRegistry.SYSTEM_EXTERNAL_EDITOR_ID);
    }

    // next lookup the default text editor
    if (editorDesc == null) {
      editorDesc = editorReg.findEditor(IDEWorkbenchPlugin.DEFAULT_TEXT_EDITOR_ID);
    }
    return editorDesc;
  }