       if(not file.includes('dep-src')) # TODO: put under flag
         addNoteToMessageView note for note in notes
 
-        # TODO: add markers if editor open
-        if(@editors.has(file))
-          editor = @editors.get(file)
-          for note in notes
-            marker = editor.markBufferPosition([note.line, note.col], {invalidate: 'inside'})
-            editor.decorateMarker(marker, {})
-
 
   clearScalaNotes: ->
     @messages.clear()

{MessagePanelView, LineMessageView} = require 'atom-message-panel'
_ = require 'lodash'
{log, isScalaSource} = require '../utils'
{CompositeDisposable} = require 'atom'

# TODO: Add a map from file -> array[messages] and editor subs
module.exports =
class TypeChecking


  constructor: ->
    @messages = new MessagePanelView
      title: 'Ensime'
    @messages.attach()

    @disposables = new CompositeDisposable

    @editors = new Map

    @markersOfFile = new Map

    @disposables.add atom.workspace.observeTextEditors (editor) =>
      if isScalaSource(editor) # TODO: check that the source is also in an ensime-activated project.  ensime:start should log which directories are ensime-enabled
        @editors.set(editor.getPath(), editor)
        @disposables.add editor.onDidDestroy () =>
          @editors.delete(editor.getPath())

  hide: ->
    @messages.hide()

  show: ->
    @messages.show()

  addScalaNotes: (msg) ->
    notes = msg.notes

    @messages.clear()
    @messages?.close()
    @messages = null
