@Override public boolean wizardhook_validateFinish() { int button = UIUtils.warningConfMessageBox( getShell(), getLabel("validateFirstLine") // $NON-NLS-1$ + System.getProperty("line.separator") + getLabel("validateSecondLine")); // $NON-NLS-1$ //$NON-NLS-2$ return button == SWT.YES; }
@Override public boolean performFinish() { // validate the status output String outputDirName = getFinishPage().getOutputDir(); File statusDir = new File(outputDirName); if (!statusDir.exists() || !statusDir.isDirectory()) { UIUtils.errorMessageBox( getShell(), Labels.getString("LoadWizard.errorValidDirectory")); // $NON-NLS-1$ return false; } // set the files for status output try { getController().setStatusFiles(outputDirName, false, true); getController().saveConfig(); } catch (ProcessInitializationException e) { UIUtils.errorMessageBox(getShell(), e); return false; } int val = UIUtils.warningConfMessageBox(getShell(), getConfirmationText()); if (val != SWT.YES) { return false; } if (!wizardhook_validateFinish()) { return false; } try { ProgressMonitorDialog dlg = new ProgressMonitorDialog(getShell()); dlg.run(true, true, new SWTLoadRunable(getController())); } catch (InvocationTargetException e) { logger.error(Labels.getString("LoadWizard.errorAction"), e); // $NON-NLS-1$ UIUtils.errorMessageBox(getShell(), e.getCause() != null ? e.getCause() : e); return false; } catch (InterruptedException e) { logger.error(Labels.getString("LoadWizard.errorAction"), e); // $NON-NLS-1$ UIUtils.errorMessageBox(getShell(), e.getCause() != null ? e.getCause() : e); return false; } return true; }