public void appStarting(final Project projectFromCommandLine) {
   if (projectFromCommandLine != null) return;
   GeneralSettings generalSettings = GeneralSettings.getInstance();
   if (generalSettings.isReopenLastProject()) {
     List<String> openPaths;
     synchronized (myStateLock) {
       openPaths = ContainerUtil.newArrayList(myState.openPaths);
     }
     if (!openPaths.isEmpty()) {
       for (String openPath : openPaths) {
         if (isValidProjectPath(openPath)) {
           doOpenProject(openPath, null, true);
         }
       }
     } else {
       String lastProjectPath = getLastProjectPath();
       if (lastProjectPath != null) {
         if (isValidProjectPath(lastProjectPath)) doOpenProject(lastProjectPath, null, false);
       }
     }
   }
 }
示例#2
0
  public StudyListView() {
    screen = new List(MenuText.SELECT_STUDY() + " - " + title, Choice.IMPLICIT);
    ((List) screen).setFitPolicy(List.TEXT_WRAP_ON);

    screen.setCommandListener(this);
    if (!GeneralSettings.isMainMenu()) {
      screen.addCommand(DefaultCommands.cmdExit);
      screen.addCommand(DefaultCommands.cmdSel);
      screen.addCommand(DefaultCommands.cmdDownloadStudy);
      screen.addCommand(DefaultCommands.cmdUploadData);
      screen.addCommand(DefaultCommands.cmdSettings);
    } else {
      screen.addCommand(DefaultCommands.cmdSel);
      screen.addCommand(DefaultCommands.cmdCancel);
    }
  }
 public void appFrameCreated(
     final String[] commandLineArgs, @NotNull final Ref<Boolean> willOpenProject) {
   if (GeneralSettings.getInstance().isReopenLastProject() && getLastProjectPath() != null) {
     willOpenProject.set(Boolean.TRUE);
   }
 }