+commandDisposable = null
 grammarListView = null
 grammarStatusView = null
 

  if editor?
    GrammarListView = require './grammar-list-view'
    grammarListView ?= new GrammarListView(editor)
  grammarListView.attach()

createGrammarStatusView = ->
  statusBar = atom.views.getView(atom.workspace).querySelector("status-bar")

      default: true

  activate: ->
    commandDisposable = atom.commands.add('atom-text-editor', 'grammar-selector:show', createGrammarListView)
    atom.packages.onDidActivateAll(createGrammarStatusView)

  deactivate: ->
    commandDisposable?.dispose()
    commandDisposable = null

    grammarStatusView?.destroy()
    grammarStatusView = null

    grammarListView?.destroy()
    grammarListView = null

