     return  @getDelegate().tabView.getActivePane().tabHandle
 
   toggleFullscreen: ->
-    mainView = KD.getSingleton "mainView"
+    mainView = KD.getSingleton 'mainView'
     mainView.toggleFullscreen()
 
+  getAdvancedSettingsMenuItems:->
+    settings      :
+      type        : 'customView'
+      view        : new AceSettingsView
+        delegate  : @ace
+
   getSaveMenu:->
-    "Save as..." :
+    'Save as...' :
       id         : 13
       parentId   : null
       callback   : =>

      KD.singletons.localSync.removeFromOpenedFiles file
      @getDelegate().removeOpenDocument @

    @ace.on "ace.changeSetting", (setting, value)->
      if setting is "syntax"
        file = @getData()
        fileExtension = file.getExtension()
        appStorage = KD.getSingleton('appStorageController').storage 'Ace', '1.0.1'
        appStorage.setValue "syntax_#{fileExtension}", value

    @ace.on "FileIsReadOnly", =>
      @getActiveTabHandle().setClass "readonly"
      @ace.setReadOnly yes
      modal             = new KDModalView
        title           : "This file is readonly"
        content         : """
        <div class="modalformline">
          <p>

      [node] = finderController.treeController.selectedNodes
      name   = input.getValue()

      return @ace.notify 'Please type valid file name!'   , 'error'  unless FSHelper.isValidFileName name
      return @ace.notify 'Please select a folder to save!', 'error'  unless node

      dialog.destroy()
      # @utils.wait 300, => # temp fix to be sure overlay has removed with fade out animation

      parent = node.getData()
      file.emit 'file.requests.saveAs', @ace.getContents(), name, parent.path
      file.once 'fs.saveAs.finished',   @ace.bound 'saveAsFinished'
      @ace.emit 'AceDidSaveAs', name, parent.path
      oldCursorPosition = @ace.editor.getCursorPosition()
      file.on 'fs.saveAs.finished', =>
        {tabView} = @getDelegate()
        return  if tabView.willClose
        @getDelegate().openFile FSHelper.createFileFromPath "#{parent.path}/#{name}", yes
