     return unless problems?.length > 0
     @decorateEditor(editor, problems)
 
+  dispose: =>
+    @subscriptions.dispose()
+
+
 module.exports = AnalysisDecorator

        problem = m.getProperties().problem
        _.any(problems, (p) => _.isEqual(p, problem))
      ).value()
    _.invoke ms, 'destroy'

  decorateEditor: (editor, problems) =>
    # @clearMarkers(editor, problems)
    for problem in problems
      location = problem.location


{CompositeDisposable} = require 'atom'
_ = require 'lodash'

class AnalysisDecorator
  constructor: (@errors) ->
    @subscriptions = new CompositeDisposable()
    @listen()

  listen: =>
    @subscriptions.add atom.workspace.observeTextEditors @handleEditors
    @subscriptions.add @errors.onChange @handleErrors

  clearMarkers: (editor, problems) =>
    markers = editor.findMarkers
