use of org.talend.repository.services.ui.scriptmanager.ServiceExportWithMavenManager in project tesb-studio-se by Talend.
the class ServiceExportWizard method performFinish.
@Override
public boolean performFinish() {
final String destinationValue = mainPage.getDestinationValue();
// TESB-7319: add confirm dialog
if (new File(destinationValue).exists()) {
boolean openQuestion = MessageDialog.openQuestion(getShell(), Messages.ServiceExportWizard_destinationExistTitle, Messages.ServiceExportWizard_destinationExistMessage);
if (!openQuestion) {
return false;
}
}
// END TESB-7319
Map<ExportChoice, Object> exportChoiceMap = mainPage.getExportChoiceMap();
try {
if (mainPage.isAddMavenScript()) {
ServiceExportWithMavenManager mavenManager = new ServiceExportWithMavenManager(exportChoiceMap, IContext.DEFAULT, JobScriptsManager.LAUNCHER_ALL, IProcessor.NO_STATISTICS, IProcessor.NO_TRACES);
IRunnableWithProgress action = new ExportServiceWithMavenAction(mavenManager, exportChoiceMap, serviceItem, destinationValue);
getContainer().run(false, true, action);
} else {
IRunnableWithProgress action = new ExportServiceAction(serviceItem, destinationValue, exportChoiceMap);
getContainer().run(true, true, action);
}
mainPage.finish();
} catch (InvocationTargetException e) {
MessageBoxExceptionHandler.process(e.getCause(), getShell());
return false;
} catch (InterruptedException e) {
return false;
}
return true;
}
Aggregations