 { EventEmitter2 } = require 'eventemitter2'
-d = (require 'debug') 'watcher'
+d = (require 'debug') 'refactor:watcher'
 
 module.exports =
 class Watcher extends EventEmitter2
 
   constructor: (@moduleManager, @editor) ->
+    d 'constructor'
     super()
     #@editor.on 'grammar-changed', @verifyGrammar
 

    @eventCursorMoved = on

  onParseEnd: (errors) =>
    if errors?
      @createErrors errors
    else

    @moduleManager.on 'changed', @verifyGrammar

  destruct: =>
    d 'destruct'
    @removeAllListeners()
    @deactivate()
    #@editor.off 'grammar-changed', @verifyGrammar
