 EditorLinter = require './editor-linter'
 Helpers = require './helpers'
 Commands = require './commands'
+Messages = require './messages'
 
 class Linter
   constructor:(@state)  ->

    @subscriptions = new CompositeDisposable
    @emitter = new Emitter
    @editorLinters = new Map
    @messages = new Map # Values set in editor-linter and consumed in views.render
    @linters = new Set # Values are pushed here from Main::consumeLinter

    @views = new LinterViews @state, this
    @commands = new Commands this


    @linters

  setMessages: (linter, messages) ->
    @messages.set(linter, messages)

  deleteMessages: (linter, messages) ->
    @messages.delete(linter)

  getMessages: ->
    return @messages.get()

  onDidChangeMessages: (callback)->
    return @messages.onDidChange(callback)

  onDidChangeProjectMessages: (callback) ->
    console.warn("Linter::onDidChangeProjectMessages is deprecated, use Linter::onDidChangeMessages instead")
