 ResultSetModel = require './models/result-set-model'
 fs = require 'fs'
 path = require 'path'
+spawn = require('child_process').spawn
 
 module.exports = CscopeCommands =
   getSourceFiles: (project, exts) ->

    
  runCommand: (command, args, options = {}) ->
    process = new Promise (resolve, reject) =>
      output = ''
      try
        new BufferedProcess
          command: command
          args: args
          options: options
          stdout: (data) -> output += data.toString()
          stderr: (data) -> reject {success: false, message: "At " + options.cwd + ": " + data.toString()}
          exit: (code) -> resolve output
      catch
        reject "Couldn't find cscope"
    return process
    
  runCscopeCommand: (num, keyword, cwd) ->

      .catch (data) ->
        reject data

    return motherSwear
