     editor = atom.workspace.getActiveTextEditor();
 
     if editor
-      file = new File(editor.getPath());
       @fields.selection = editor.getSelectedText();
+
+    if filePath
+      file = new File(filePath);
 
       nameExt = @splitFileName(file.getBaseName());
       @fields.fileName = nameExt[0];

_ = require 'underscore-plus'
ProcessConfig = require '../process-config'
{BufferedProcess, Directory, File} = require 'atom'

# Fields :
# stdout : Standard output.

      return;

    @process.kill();
    # @processStopped(false);

  handleProcessErrorCallback: (errorObject) =>
    # Indicate that the error has been handled.
