if (cmtDialog.processResults()) { final String trialId = cmtDialog.getTrialId(); if (trialId != null) { Experiment experiment = helper.createExperiment(originalExperimentName, cmtDialog.getExperimentName(), cmtDialog.getExperimentId(), trialId); if (experiment != null) { DefaultMutableTreeNode newNode = addExperimentToWorkspace(experiment); RecipeComponent[] recipes = experiment.getRecipeComponents(); for (int i = 0; i < recipes.length; i++) if (!recipeNames.contains(recipes[i].getRecipeName())) addRecipeToWorkspace(recipes[i]); workspace.setSelection(newNode); } } } GUIUtils.timeConsumingTaskEnd(organizer);
societyCopy.saveToDatabase(); GUIUtils.timeConsumingTaskEnd(organizer);
        public void run() {	  // a potentially long process          if (cmtDialog.processResults()) {	    final String trialId = cmtDialog.getTrialId();	    if (trialId != null) {	      Experiment experiment =		helper.createExperiment(originalExperimentName,					cmtDialog.getExperimentName(),					cmtDialog.getExperimentId(), 					trialId);	      if (experiment != null) {		DefaultMutableTreeNode newNode =		  addExperimentToWorkspace(experiment);		RecipeComponent[] recipes = experiment.getRecipeComponents();		for (int i = 0; i < recipes.length; i++)		  if (!recipeNames.contains(recipes[i].getRecipeName()))		    addRecipeToWorkspace(recipes[i]);		workspace.setSelection(newNode);	      }	    }	  }          GUIUtils.timeConsumingTaskEnd(organizer);        }