Search in sources :

Example 1 with DeleteExtensionJob

use of org.talend.designer.components.exchange.jobs.DeleteExtensionJob in project tdi-studio-se by Talend.

the class DeleteExtensionAction method run.

public void run() {
    if (extension == null) {
        return;
    }
    try {
        final DeleteExtensionJob job = new DeleteExtensionJob(extension);
        job.addJobChangeListener(new JobChangeAdapter() {

            @Override
            public void done(final IJobChangeEvent event) {
                Display.getDefault().asyncExec(new Runnable() {

                    public void run() {
                        updateUI(job, event);
                    }
                });
            }
        });
        ExchangeUtils.scheduleUserJob(job);
    } catch (Throwable e) {
        ExceptionHandler.process(e);
    }
}
Also used : JobChangeAdapter(org.eclipse.core.runtime.jobs.JobChangeAdapter) IJobChangeEvent(org.eclipse.core.runtime.jobs.IJobChangeEvent) DeleteExtensionJob(org.talend.designer.components.exchange.jobs.DeleteExtensionJob)

Aggregations

IJobChangeEvent (org.eclipse.core.runtime.jobs.IJobChangeEvent)1 JobChangeAdapter (org.eclipse.core.runtime.jobs.JobChangeAdapter)1 DeleteExtensionJob (org.talend.designer.components.exchange.jobs.DeleteExtensionJob)1