Index: openide/dialogs/src/org/openide/Bundle.properties =================================================================== RCS file: /shared/data/ccvs/repository/openide/dialogs/src/org/openide/Bundle.properties,v --- openide/dialogs/src/org/openide/Bundle.properties 17 May 2005 00:15:01 -0000 1.2 +++ openide/dialogs/src/org/openide/Bundle.properties 2 Nov 2005 16:11:41 -0000 @@ -100,3 +100,5 @@ #Property - wizard panel image alignment #NOI18N STRING_WizardImageAlignment=South + +MSG_WizardDescriptor_FinishInProgress=The Finish is being processed... Index: openide/dialogs/src/org/openide/WizardDescriptor.java =================================================================== RCS file: /shared/data/ccvs/repository/openide/dialogs/src/org/openide/WizardDescriptor.java,v --- openide/dialogs/src/org/openide/WizardDescriptor.java 20 Oct 2005 07:28:04 -0000 1.15 +++ openide/dialogs/src/org/openide/WizardDescriptor.java 2 Nov 2005 16:11:42 -0000 @@ -1620,33 +1620,46 @@ if (ev.getSource() == finishButton) { Runnable onValidPerformer = new Runnable() { public void run() { - // do instantiate - try { - callInstantiate(); - } catch (IOException ioe) { - // notify to log - ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ioe); - - setValueWithoutPCH(NEXT_OPTION); - updateStateWithFeedback(); - - // notify user by the wizard's status line - putProperty(PROP_ERROR_MESSAGE, ioe.getLocalizedMessage()); - - // if validation failed => cannot move to next panel - return; - } - - // all is OK - // close wizrad - finishOption.fireActionPerformed(); - - Object oldValue = getValue(); - setValueWithoutPCH(OK_OPTION); - - resetWizard(); - - firePropertyChange(PROP_VALUE, oldValue, OK_OPTION); + cancelButton.setEnabled (false); + previousButton.setEnabled (false); + nextButton.setEnabled (false); + finishButton.setEnabled (false); + if (wizardPanel != null) wizardPanel.setErrorMessage (NbBundle.getMessage (WizardDescriptor.class, "MSG_WizardDescriptor_FinishInProgress"), Boolean.TRUE); // NOI18N + RequestProcessor.getDefault ().post (new Runnable () { + public void run () { + assert ! SwingUtilities.isEventDispatchThread () : "Cannot invoked within EDT!"; + // do instantiate + try { + callInstantiate(); + } catch (IOException ioe) { + // notify to log + ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ioe); + + setValueWithoutPCH(NEXT_OPTION); + updateStateWithFeedback(); + + // notify user by the wizard's status line + putProperty(PROP_ERROR_MESSAGE, ioe.getLocalizedMessage()); + + // if validation failed => cannot move to next panel + return; + } + SwingUtilities.invokeLater (new Runnable () { + public void run () { + // all is OK + // close wizrad + finishOption.fireActionPerformed(); + + Object oldValue = getValue(); + setValueWithoutPCH(OK_OPTION); + + resetWizard(); + + firePropertyChange(PROP_VALUE, oldValue, OK_OPTION); + } + }); + } + }); } }; lazyValidate(panels.current(), onValidPerformer);