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:
parent
8c5a9f0d91
commit
564e54347f
1 changed files with 6 additions and 6 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue