   ###
   CONTEXT MENU CREATE/MANAGE
   ###
-  
+
   createContextMenu:(nodeView, event)->
-    
+
     event.stopPropagation()
     event.preventDefault()
     return if nodeView.beingDeleted or nodeView.beingEdited
-    
+
     if nodeView in @selectedNodes
       contextMenu = @contextMenuController.getContextMenu @selectedNodes, event
-    else  
+    else
       @selectNode nodeView
       contextMenu = @contextMenuController.getContextMenu [nodeView], event
     no
-  
+
   contextMenuItemSelected:(nodeView, contextMenuItem)->
-    
+
     {action} = contextMenuItem.getData()
     if action
       # return false if you don't want contextmenu to disappear
       shouldDestroy = @["contextMenuOperation#{action.capitalize()}"]? nodeView, contextMenuItem
       if shouldDestroy isnt no
         @contextMenuController.destroyContextMenu()
-  
+
   ###
   RESET STATES
   ###
-  
+
   resetBeingEditedItems:->
-    
+
     @beingEdited.resetView()
-  
+
   organizeSelectedNodes:(listController, nodes, event = {})->
-    
+
     @resetBeingEditedItems() if @beingEdited
     super
 
   ###
   DND UI FEEDBACKS
   ###
-  
+
   showDragOverFeedback:(nodeView, event)-> super
-    
+
   clearDragOverFeedback:(nodeView, event)-> super
-  
+
   clearAllDragFeedback:-> super
-  
+
   ###
   HANDLING MOUSE EVENTS
   ###
-  
+
   click:(nodeView, event)->
-    
+
     if $(event.target).is ".chevron-arrow"
       @contextMenu nodeView, event
       return no
     super
-  
+
   dblClick:(nodeView, event)->
 
     @openItem nodeView
 
   contextMenu:(nodeView, event)->
-    
+
     if @getOptions().contextMenu
       @createContextMenu nodeView, event
 

      appManager.notify "File must be under: /#{nickname}/Sites/#{nickname}.#{location.hostname}/website/"
    else
      appManager.openFileWithApplication publicPath, "Viewer"
  
  refreshFolder:(nodeView, callback)->
    
    @notify "Refreshing..."
    folder = nodeView.getData()
    folder.emit "fs.nothing.finished", [] # in case of refresh to stop the spinner
    
    @collapseFolder nodeView, =>
      @expandFolder nodeView, =>
        notification.destroy()
        callback?()
    
  toggleFolder:(nodeView, callback)->
    
    if nodeView.expanded then @collapseFolder nodeView, callback else @expandFolder nodeView, callback
  
  expandFolder:(nodeView, callback)->
    
    return unless nodeView
    return if nodeView.isLoading

    if nodeView.expanded
      callback? nodeView
      return
    
    cb = @utils.getCancellableCallback (files)=>
      @utils.killWait folder.failTimer
      nodeView.expand()
      @addNodes files
      callback? nodeView
      @emit "folder.expanded", nodeView.getData()
    
    folder = nodeView.getData()

    folder.failTimer = @utils.wait 5000, =>

    #   delete @aceViews[oldPath]
    #   log "put", file.path
    #   @aceViews[file.path]


  ###
  FINDER OPERATIONS
  ###

  openItem:(nodeView, callback)->

    options  = @getOptions()
    nodeData = nodeView.getData()

    switch nodeData.type
      when "folder", "mount"
        @toggleFolder nodeView, callback
