       @getView().setClass "no-context-menu"
 
     @getSingleton('mainController').on "NewFileIsCreated", (newFile)=> @navigateToNewFile newFile
-    @getSingleton('mainController').on "SelectedFileChanged", (file)=> @highlightFile file
+    @getSingleton('mainController').on "SelectedFileChanged", (view)=> @highlightFile view
 
   addNode:(nodeData, index)->
 

      #   @addNode newFile, index

      @selectNode @nodes[newFile.path]



    # #
    # # file.on "fs.saveAs.finished", (newFile, oldFile)=>

          @selectNode @nodes[newFile.path]
        @listenedPaths[file.path] = file.path

  highlightFile:(view)->

    @selectNode @nodes[view.data.path], null, no

    if view.ace?
      if view.ace.editor?
        view.ace.editor.focus()
      else
        view.ace.on "ace.ready", ->
          view.ace.editor.focus()

  navigateToNewFile:(newFile)=>

