         bc.writeAtEnd(code)
 
     allGetters: (variables) ->
-        editor = Workspace.getActiveEditor()
+        editor = atom.workspace.getActiveTextEditor()
         unless editor.getGrammar().scopeName is 'text.html.php' or editor.getGrammar().scopeName is 'source.php'
             alert ('this is not a PHP file')
             return

        }

    showAddProperty: ->
        editor = Workspace.getActiveEditor()

        unless editor.getGrammar().scopeName is 'text.html.php' or editor.getGrammar().scopeName is 'source.php'
            alert ('this is not a PHP file')

        bc.writeAtEnd(code)

    allSetters: (variables) ->
        editor = atom.workspace.getActiveTextEditor()
        unless editor.getGrammar().scopeName is 'text.html.php' or editor.getGrammar().scopeName is 'source.php'
            alert ('this is not a PHP file')
            return
