use of org.talend.repository.ui.wizards.exportjob.JobScriptsExportWizard in project tdi-studio-se by Talend.
the class ExportJobScriptAction method doRun.
@Override
protected void doRun() {
JobScriptsExportWizard processWizard = new JobScriptsExportWizard();
IWorkbench workbench = getWorkbench();
processWizard.setWindowTitle(EXPORTJOBSCRIPTS);
processWizard.init(workbench, (IStructuredSelection) this.getSelection());
Shell activeShell = Display.getCurrent().getActiveShell();
WizardDialog dialog = new WizardDialog(activeShell, processWizard);
if (checkDirtyPart(workbench)) {
MessageDialog messageDialog = new //$NON-NLS-1$
MessageDialog(//$NON-NLS-1$
new Shell(), //$NON-NLS-1$
"", //$NON-NLS-1$
null, //$NON-NLS-1$
Messages.getString("ExportJobScriptAction.confirmMessage"), MessageDialog.CONFIRM, new String[] { Messages.getString("ExportJobScriptAction.confirmContiune"), IDialogConstants.CANCEL_LABEL }, //$NON-NLS-1$
0);
if (messageDialog.open() != 0) {
// don't do anything
return;
}
}
dialog.setPageSize(830, 580);
dialog.open();
// collector
IPreferenceStore preferenceStore = RepositoryPlugin.getDefault().getPreferenceStore();
int num = preferenceStore.getInt(ExportJobTokenCollector.TOS_COUNT_JOB_EXPORTS.getPrefKey());
preferenceStore.setValue(ExportJobTokenCollector.TOS_COUNT_JOB_EXPORTS.getPrefKey(), num + 1);
}
Aggregations