 
   jsonToCson: ->
     editor = @workspace.getActiveTextEditor()
+    if typeof editor is "undefined"
+      @atom.beep()
+      return
     text = editor.getText()
 
     # Conversion

  # Automatic conversion, based on scope
  autoConvert: ->
    editor = @workspace.getActiveTextEditor()
    scope = editor.getGrammar().scopeName

    if scope is "source.coffee"

CSON = require('CSON')

module.exports = Atomizr =
  atom: atom
  workspace: atom.workspace
  grammars: atom.grammars
  subscriptions: null
