コード例 #1
0
 protected final void doOKAction() {
   int idx = getCurrentStep();
   try {
     do {
       final ModuleWizardStep step = mySteps.get(idx);
       if (step != getCurrentStepObject()) {
         step.updateStep();
       }
       if (!commitStepData(step)) {
         return;
       }
       step.onStepLeaving();
       try {
         step._commit(true);
       } catch (CommitStepException e) {
         String message = e.getMessage();
         if (message != null) {
           Messages.showErrorDialog(getCurrentStepComponent(), message);
         }
         return;
       }
       if (!isLastStep(idx)) {
         idx = getNextStep(idx);
       } else {
         break;
       }
     } while (true);
   } finally {
     myCurrentStep = idx;
     updateStep();
   }
   super.doOKAction();
 }
コード例 #2
0
 private boolean commitCurrentStep() {
   try {
     mySteps.get(myCurrentStep).commitForNext();
   } catch (CommitStepException e) {
     Messages.showErrorDialog(getContentPane(), e.getMessage());
     return false;
   }
   return true;
 }