1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 22:22:11 +02:00

Bug 315415: always clear a terminated job from pathToJobsMap, and store off fetchedExecutables as soon as possible, leaving only UI work to Display#asyncExec().

This commit is contained in:
Ed Swartz 2010-06-04 18:23:39 +00:00
parent 8c5a9f0d91
commit 564e54347f

View file

@ -124,15 +124,15 @@ public class SourceFilesContentProvider extends CElementContentProvider implemen
final QuickParseJob theJob = job;
job.addJobChangeListener(new JobChangeAdapter() {
public void done(IJobChangeEvent event) {
synchronized (pathToJobMap) {
pathToJobMap.values().remove(theJob);
}
if (event.getResult().isOK()) {
synchronized (fetchedExecutables) {
fetchedExecutables.put(exePath, theJob.tus);
}
Display.getDefault().asyncExec(new Runnable() {
public void run() {
synchronized (pathToJobMap) {
pathToJobMap.values().remove(theJob);
}
synchronized (fetchedExecutables) {
fetchedExecutables.put(exePath, theJob.tus);
}
// update the viewer
if (!viewer.getControl().isDisposed()) {
viewer.getTree().setLayoutDeferred(true);