Search in sources :

Example 16 with IDynamicMonitor

use of org.talend.designer.maven.aether.IDynamicMonitor in project tbd-studio-se by Talend.

the class DynamicDistributionPreferenceForm method onDeleteBtnPressed.

private void onDeleteBtnPressed() {
    IStructuredSelection selection = (IStructuredSelection) versionCombo.getSelection();
    final IDynamicPlugin dynamicPlugin = (IDynamicPlugin) selection.getFirstElement();
    boolean agree = MessageDialog.openConfirm(getShell(), // $NON-NLS-1$
    Messages.getString("DynamicDistributionPreferenceForm.form.deleteExistingConfig.confirm.dialog.title"), // $NON-NLS-1$
    Messages.getString(// $NON-NLS-1$
    "DynamicDistributionPreferenceForm.form.deleteExistingConfig.confirm.dialog.message", dynamicPlugin.getPluginConfiguration().getName()));
    if (agree) {
        try {
            doDelete(dynamicPlugin);
            IDynamicMonitor monitor = new DummyDynamicMonitor();
            refreshVersionList(monitor);
        } catch (Throwable e) {
            ExceptionHandler.process(e);
            String message = e.getMessage();
            if (StringUtils.isEmpty(message)) {
                // $NON-NLS-1$
                message = Messages.getString("ExceptionDialog.message.empty");
            }
            // $NON-NLS-1$
            ExceptionMessageDialog.openError(getShell(), Messages.getString("ExceptionDialog.title"), message, e);
        }
    }
}
Also used : IDynamicPlugin(org.talend.core.runtime.dynamic.IDynamicPlugin) DummyDynamicMonitor(org.talend.designer.maven.aether.DummyDynamicMonitor) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) IDynamicMonitor(org.talend.designer.maven.aether.IDynamicMonitor)

Example 17 with IDynamicMonitor

use of org.talend.designer.maven.aether.IDynamicMonitor in project tbd-studio-se by Talend.

the class DynamicDistributionOptionPage method createControl.

@Override
public void createControl(Composite parent) {
    IDynamicMonitor monitor = new DummyDynamicMonitor();
    AbstractDynamicDistributionForm.ICheckListener checkListener = new ICheckListener() {

        @Override
        public void showMessage(String message, int level) {
            setMessage(message, level);
        }

        @Override
        public void updateButtons() {
            getContainer().updateButtons();
        }

        @Override
        public String getMessage() {
            return DynamicDistributionOptionPage.this.getMessage();
        }

        @Override
        public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) throws Exception {
            getContainer().run(fork, cancelable, runnable);
        }
    };
    AbstractDynamicDistributionForm setupForm = new DynamicDistributionOptionForm(parent, SWT.NONE, getDynamicBuildConfigurationData(), monitor);
    setupForm.setCheckListener(checkListener);
    setControl(setupForm);
    setCurrentForm(setupForm);
    setPageComplete(false);
}
Also used : ICheckListener(org.talend.repository.hadoopcluster.ui.dynamic.form.AbstractDynamicDistributionForm.ICheckListener) ICheckListener(org.talend.repository.hadoopcluster.ui.dynamic.form.AbstractDynamicDistributionForm.ICheckListener) DummyDynamicMonitor(org.talend.designer.maven.aether.DummyDynamicMonitor) AbstractDynamicDistributionForm(org.talend.repository.hadoopcluster.ui.dynamic.form.AbstractDynamicDistributionForm) IDynamicMonitor(org.talend.designer.maven.aether.IDynamicMonitor) IRunnableWithProgress(org.eclipse.jface.operation.IRunnableWithProgress) DynamicDistributionOptionForm(org.talend.repository.hadoopcluster.ui.dynamic.form.DynamicDistributionOptionForm)

Aggregations

IDynamicMonitor (org.talend.designer.maven.aether.IDynamicMonitor)17 DummyDynamicMonitor (org.talend.designer.maven.aether.DummyDynamicMonitor)10 IRunnableWithProgress (org.eclipse.jface.operation.IRunnableWithProgress)8 AbsDynamicProgressMonitor (org.talend.designer.maven.aether.AbsDynamicProgressMonitor)7 InvocationTargetException (java.lang.reflect.InvocationTargetException)6 IDynamicPlugin (org.talend.core.runtime.dynamic.IDynamicPlugin)6 IDynamicPluginConfiguration (org.talend.core.runtime.dynamic.IDynamicPluginConfiguration)5 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)4 IDynamicDistributionsGroup (org.talend.hadoop.distribution.dynamic.IDynamicDistributionsGroup)4 DynamicDistributionSetupData (org.talend.repository.hadoopcluster.ui.dynamic.DynamicDistributionSetupData)4 AbstractDynamicDistributionForm (org.talend.repository.hadoopcluster.ui.dynamic.form.AbstractDynamicDistributionForm)4 ICheckListener (org.talend.repository.hadoopcluster.ui.dynamic.form.AbstractDynamicDistributionForm.ICheckListener)4 File (java.io.File)2 LinkedList (java.util.LinkedList)2 NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)2 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)2 DynamicDistributionPreferenceForm (org.talend.repository.hadoopcluster.ui.dynamic.form.DynamicDistributionPreferenceForm)2 ArrayList (java.util.ArrayList)1 List (java.util.List)1 ProgressMonitorDialog (org.eclipse.jface.dialogs.ProgressMonitorDialog)1