Class[] paramClasses = { CSMART.class, Experiment.class }; Object[] params = new Object[2]; params[0] = this; params[1] = experiment; console = (CSMARTConsole)createNewTool(EXPERIMENT_CONTROLLER, CSMARTConsole.class, experiment.getExperimentName(), experiment, paramClasses, params);
JFrame tool = (JFrame)new CSMARTConsole(this, experiment); addTool(EXPERIMENT_CONTROLLER, experiment.getExperimentName(), tool);
  protected void runConsole(Experiment experiment) {    // TODO: we get here if the user edits an experiment containing    // societies and removes all the societies, and then invokes the console    if (experiment.getSocietyComponentCount() == 0) {      // don't run console and disable it's button      enableConsoleTool(false);      return;    }    // TODO: we get here if the user is editing an experiment    // the isRunnable flag is off, but we don't detect it    if (!experiment.isRunnable()) {      if (log.isWarnEnabled())        log.warn("CSMART: WARNING: experiment is not runnable");      enableConsoleTool(false);      return;    }    Class[] paramClasses = { CSMART.class, Experiment.class };    Object[] params = new Object[2];    params[0] = this;    params[1] = experiment;    console = (CSMARTConsole)createNewTool(EXPERIMENT_CONTROLLER,					   CSMARTConsole.class, 					   experiment.getExperimentName(),					   experiment,                                            paramClasses, params);  }