 Editor = require './editor'
 Statusbar = require './statusbar'
 
+VariablesController = require '../controllers/variables'
+
 
 module.exports = class StackEditor extends kd.View
 
+  EDITORS = ['editor', 'readme', 'variables', 'logs']
 
   constructor: (options = {}, data = {}) ->
 

    return  unless id

    @_snapshots[id] ?= {}
    for view in ['editor', 'readme', 'logs']
      @_snapshots[id][view] = @[view]._dump()




      @editor.setContent Encoder.htmlDecode template.rawContent
      @readme.setContent description
      @variables.setContent ''
      @variablesController.setData data
      @logs.setContent 'Stack template loaded'

      @_saveSnapshot id
