Пример #1
0
 private void doAddButton() {
   TaskModel taskModel = new TaskModel();
   if (showWizard(taskModel, null) == Window.OK) {
     IGeneratorConfiguration generatorConfiguration =
         (IGeneratorConfiguration) taskModel.getObject(TaskModel.TASK_GENERATOR_CONFIGURATION);
     generatorConfigurationComp.addElement(generatorConfiguration);
   }
 }
Пример #2
0
 private void doEditButton() {
   List<IGeneratorConfiguration> selectedElements =
       generatorConfigurationComp.getSelectedElements();
   if (selectedElements == null || selectedElements.size() < 1) {
     return;
   }
   IGeneratorConfiguration selectedGeneratorConfiguration = selectedElements.get(0);
   TaskModel taskModel = new TaskModel();
   if (showWizard(taskModel, selectedGeneratorConfiguration) == Window.OK) {
     IGeneratorConfiguration generatorConfiguration =
         (IGeneratorConfiguration) taskModel.getObject(TaskModel.TASK_GENERATOR_CONFIGURATION);
     generatorConfigurationComp.replaceElement(
         selectedGeneratorConfiguration, generatorConfiguration);
   }
 }