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.getRecipes(); for (int i = 0; i < recipes.length; i++) if (!recipeNames.contains(recipes[i].getRecipeName())) addRecipeToWorkspace(recipes[i]); workspace.setSelection(newNode); } }
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.getRecipes(); for (int i = 0; i < recipes.length; i++) if (!recipeNames.contains(recipes[i].getRecipeName())) addRecipeToWorkspace(recipes[i]); workspace.setSelection(newNode); } } }
        public void run() {          cmtDialog.processResults(); // a potentially long process          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.getRecipes();              for (int i = 0; i < recipes.length; i++)                if (!recipeNames.contains(recipes[i].getRecipeName()))                  addRecipeToWorkspace(recipes[i]);              workspace.setSelection(newNode);            }          }          GUIUtils.timeConsumingTaskEnd(organizer);        }