class EditorModel {

  public void openWithExternalEditor(final File file) throws ConsoleException {
    final ExternalEditor externalEditor;

    synchronized (this) {
      externalEditor = m_externalEditor;
    }

    if (externalEditor == null) {
      throw new DisplayMessageConsoleException(m_resources,
                                               "externalEditorNotSet.text");
    }

    try {
      externalEditor.open(file);
    }
    catch (IOException e) {
      throw new DisplayMessageConsoleException(m_resources,
                                               "externalEditError.text",
                                               e);
    }
  }

  public  EditorModel(Resources resources,
                     TextSource.Factory textSourceFactory,
                     AgentCacheState agentCacheState,
                     FileChangeWatcher fileChangeWatcher);

}