@Override
  public boolean closeEditorWindow() {
    if (!canClose()) {
      LOG.info("Close cancelled");
      return false;
    }

    Project project = frameWrapper.getProject();
    frameWrapper.getFrame().setVisible(false);
    saveSession();
    editorWindowClosing = true;
    try {
      editorManager.closeAllEditors();
    }
    finally {
      editorWindowClosing = false;
    }

    LOG.info("Window closed");
    ApplicationManager.getApplication().getMessageBus().syncPublisher(LightEditServiceListener.TOPIC).lightEditWindowClosed(project);
    if (ProjectManager.getInstance().getOpenProjects().length == 0 && WelcomeFrame.getInstance() == null) {
      closeAndDisposeFrame();
      LOG.info("No open projects or welcome frame, exiting");
      try {
        Disposer.dispose(editorManager);
        ApplicationManager.getApplication().exit();
      }
      catch (Throwable t) {
        System.exit(1);
      }
    }
    else {
      WindowManagerEx.getInstanceEx().releaseFrame(frameWrapper);
      frameWrapper = null;
    }
    return false;
  }
@Override
  public boolean closeEditorWindow()