Search in sources :

Example 1 with UploadRevisionJob

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

the class UploadRevisionAction method run.

public void run() {
    if (extension == null) {
        return;
    }
    try {
        final UploadRevisionJob job = new UploadRevisionJob(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 : UploadRevisionJob(org.talend.designer.components.exchange.jobs.UploadRevisionJob) JobChangeAdapter(org.eclipse.core.runtime.jobs.JobChangeAdapter) IJobChangeEvent(org.eclipse.core.runtime.jobs.IJobChangeEvent)

Aggregations

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