 
 class AceView extends JView
 
-  constructor:(options = {}, file)->
-
-    options.advancedSettings ?= no
+  constructor: (options = {}, file) ->
 
     super options, file
 
     @listenWindowResize()
 
-    @caretPosition = new KDCustomHTMLView
-      tagName       : "div"
-      cssClass      : "caret-position section"
-      partial       : "<span>1</span>:<span>1</span>"
-
     @ace = new Ace
       delegate        : @
       enableShortcuts : yes
     , file
-
-    @advancedSettings = new KDButtonViewWithMenu
-      style         : 'editor-advanced-settings-menu'
-      icon          : yes
-      iconOnly      : yes
-      iconClass     : "cog"
-      type          : "contextmenu"
-      delegate      : this
-      itemClass     : AceSettingsView
-      click         : (pubInst, event)-> @contextMenu event
-      menu          : @getAdvancedSettingsMenuItems.bind @
-    @advancedSettings.disable()
-
-    unless options.advancedSettings
-      @advancedSettings.hide()
 
     @findAndReplaceView = new AceFindAndReplaceView delegate: @
     @findAndReplaceView.hide()

    @setViewListeners()

  setViewListeners:->

    @ace.on "ace.ready", => @advancedSettings.enable()

    @ace.on "ace.changeSetting", (setting, value)=>
      @ace["set#{setting.capitalize()}"]? value

    @advancedSettings.emit "ace.settingsView.setDefaults", @ace

    $spans = @caretPosition.$('span')

    @ace.on "ace.change.cursor", (cursor)=>
      $spans.eq(0).text ++cursor.row
      $spans.eq(1).text ++cursor.column

    @ace.on "ace.requests.saveAs", (contents, options)=>
      @openSaveDialog options

    mainView = KD.getSingleton "mainView"
    mainView.toggleFullscreen()

  getSaveMenu:->
    "Save as..." :
      id         : 13
      parentId   : null
      callback   : =>
        @openSaveDialog closeAfter: no

  openSaveDialog: (options = {}) ->
    { closeAfter }   = options
