     cmd = Utils.getExecPath 'dart'
     Utils.whenDartSdkFound =>
       @process = spawn cmd, args
-      @writable = true
+      @isRunning = true
       @process.stdout.pipe(StreamSplitter("\n")).on 'token', @processMessage
       @process.on 'exit', =>
-        @writable = false
+        @isRunning = false
 
       # Set analysis root.
       @setAnalysisRoots analysisRoots

class AnalysisServer
  id: 1
  promiseMap = {}
  writable: false

  constructor: ->
    @emitter = new Emitter()

  sendMessage: (obj) =>
    obj.id ||= "dart-tools-#{(@id++)}"
    msg = JSON.stringify(obj)
    if @isRunning
      @process?.stdin?.write(msg + "\n")

    deferred = Q.defer()
