public void appClosing() {
    if (!myFrameAllowed) {
      return;
    }

    IdeFrame[] frames = WindowManager.getInstance().getAllProjectFrames();
    int length = frames.length;

    if (length < 2) {
      return;
    }

    ID[] windows = new ID[length];

    for (int i = 0; i < length; i++) {
      IdeFrameImpl frame = ((ProjectFrameHelper)frames[i]).getFrame();
      JRootPane pane = frame.getRootPane();
      if (pane.getClientProperty(CLOSE_MARKER) != null) {
        return;
      }
      pane.putClientProperty(CLOSE_MARKER, Boolean.TRUE);
      windows[i] = MacUtil.getWindowFromJavaWindow(frame);
    }

    ID tabs = Foundation.invoke(windows[0], "tabbedWindows");

    if (Foundation.invoke(tabs, "count").intValue() != length) {
      return;
    }

    IdeFrame[] orderedFrames = new IdeFrame[length];

    for (int i = 0; i < length; i++) {
      int index = Foundation.invoke(tabs, "indexOfObject:", windows[i]).intValue();
      orderedFrames[index] = frames[i];
    }

    RecentProjectsManagerBase manager = RecentProjectsManagerBase.getInstanceEx();

    for (IdeFrame frame : orderedFrames) {
      Project project = frame.getProject();
      if (project != null) {
        String path = manager.getProjectPath(project);
        if (path != null) {
          manager.markPathRecent(path, project);
        }
      }
    }
  }
public void appClosing()