     @setupJavaScriptArguments()
     @buildApplicationMenu()
     @handleEvents()
+    @createAtomWindow()
 
   setupJavaScriptArguments: ->
     app.commandLine.appendSwitch 'js-flags', '--harmony_collections'

  setupNodePaths()
  atomApplication = new AtomApplication

  new AtomWindow
    bootstrapScript: 'window-bootstrap',
    resourcePath: resourcePath

delegate.browserMainParts.preMainMessageLoopRun = bootstrapApplication

app = require 'app'

      window.removeAllListeners 'close'
      window.close()

    ipc.on 'open-folder', =>
      currentWindow = BrowserWindow.getFocusedWindow()
      dialog.openFolder currentWindow, {}, (result, paths...) => @createAtomWindow()

  createAtomWindow: ->
    new AtomWindow
      bootstrapScript: 'window-bootstrap',
      resourcePath: resourcePath

class AtomWindow
  @windows = []
