     @_subscriptions.add(
       @editor.onDidStopChanging => @lint(true) if @linter.lintOnFly
     )
+
+  toggleStatus: ->
+    @setStatus !@_status
+
+  getStatus: ->
+    @_status
+
+  setStatus: (status) ->
+    @_status = status
+    if not status
+      @_messages.clear()
 
   getMessages: ->
     @_messages

class EditorLinter
  constructor: (@linter, @editor) ->
    @_messages = new Map # Consumed by LinterViews::render
    @_inProgress = false
    @_inProgressFly = false


    @_emitter.on 'did-destroy', callback

  lint: (wasTriggeredOnChange) ->
    return unless @_status
    return unless @editor is atom.workspace.getActiveTextEditor()
    return unless @editor.getPath()
    return if @_lock(wasTriggeredOnChange)
