Search in sources :

Example 1 with JobScriptsExportWizard

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);
}
Also used : IWorkbench(org.eclipse.ui.IWorkbench) JobScriptsExportWizard(org.talend.repository.ui.wizards.exportjob.JobScriptsExportWizard) Shell(org.eclipse.swt.widgets.Shell) MessageDialog(org.eclipse.jface.dialogs.MessageDialog) IPreferenceStore(org.eclipse.jface.preference.IPreferenceStore) WizardDialog(org.eclipse.jface.wizard.WizardDialog)

Aggregations

MessageDialog (org.eclipse.jface.dialogs.MessageDialog)1 IPreferenceStore (org.eclipse.jface.preference.IPreferenceStore)1 WizardDialog (org.eclipse.jface.wizard.WizardDialog)1 Shell (org.eclipse.swt.widgets.Shell)1 IWorkbench (org.eclipse.ui.IWorkbench)1 JobScriptsExportWizard (org.talend.repository.ui.wizards.exportjob.JobScriptsExportWizard)1