   ###
 
   checkGrammar: =>
+    console.log 'checkGrammar:', @editor.getTitle()
+
     @inactivate()
     @isActive = @editor.getGrammar().name is 'CoffeeScript'
     return unless @isActive

  ###

  onRename: (e) =>
    console.log 'onRename'

    # unless atom.workspaceView.getActivePaneItem() is @editor
    unless @isActive
      e.abortKeyBinding()
      return

    console.log @editor
    cursor = @editor.cursors[0]
    range = cursor.getCurrentWordBufferRange includeNonWordCharacters: false
    refRanges = @ripper.find range
    if refRanges.length is 0
      e.abortKeyBinding()
      return

    # Save cursor info.
    # Select all references.

    delete @renameInfo

  onDone: (e) =>
    unless @isActive and @isThisEditorActive()
      e.abortKeyBinding()
      return

