Job oldJob = analysisJob;
if (oldJob != null && oldJob.getState() != Job.NONE)
oldJob.cancel();
if (selectedFiles != null) {
final AnalyseBundleResolutionJob tmp = new AnalyseBundleResolutionJob("importExportAnalysis", selectedFiles);
tmp.setSystem(true);
tmp.addJobChangeListener(new JobChangeAdapter() {
@Override
public void done(IJobChangeEvent event) {
IStatus result = tmp.getResult();
if (result != null && result.isOK()) {
if (display != null && !display.isDisposed())
display.asyncExec(new Runnable() {
public void run() {
if (!tree.isDisposed())
setInput(tmp.getResultFileArray(), tmp.getImportResults(), tmp.getExportResults(), tmp.getRequiredBundles());
}
});
}
}
});