     @popupNoConnectionWarning() if @connectionState is 'closed'
     @sendSave(editor.project, buffer.file, buffer)
 
-  queueTreeViewEvent: (event) =>
-    @treeViewEventQueue.push(type: event.type, event: event)
+  onOpen: (filePath) =>
+    ipc.send 'fs-local-open', JSON.stringify(
+      action: 'local_open'
+      project:
+        path: @formatFilePath(atom.project.getPaths()[0])
+      file:
+        path: @formatFilePath(filePath)
+      )
 
   popupNoConnectionWarning: ->
     noConnectionPopup = document.createElement 'div'

    ipc.send 'fs-local-delete', JSON.stringify(
      action: 'local_delete'
      project:
        path: this.formatFilePath atom.project.getPaths()[0]
      file:
        path: this.formatFilePath path
      )

  onConfirm: (e) =>
    confirmedEvent = @treeViewEventQueue.shift()
    return unless confirmedEvent?

    {event, type} = confirmedEvent
    if type is 'tree-view:move'
      from = event.target.getAttribute('data-name')
      fromPath = event.target.getAttribute('data-path')
    if type is 'tree-view:add-file'
      window.confirmedEvent = event
      true

  onCancel: =>
    @treeViewEventQueue = []

  onSave: (editor) =>
    editorElement = atom.views.getView(editor)

      @connectionState = state

    @handleEvents()

  expandTreeView: ->
    workspaceView = atom.views.getView(atom.workspace)
