mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 02:06:01 +02:00
synchronize the building of the exe's list.
This commit is contained in:
parent
2044602e4b
commit
0aa67427b4
2 changed files with 44 additions and 39 deletions
|
@ -101,8 +101,10 @@ public class ExecutablesManager extends PlatformObject {
|
||||||
return Status.OK_STATUS;
|
return Status.OK_STATUS;
|
||||||
}
|
}
|
||||||
|
|
||||||
ArrayList<Executable> oldList = executables;
|
synchronized (executables) {
|
||||||
executables = new ArrayList<Executable>();
|
ArrayList<Executable> oldList = new ArrayList<Executable>(executables);
|
||||||
|
executables.clear();
|
||||||
|
|
||||||
synchronized (executableProviders) {
|
synchronized (executableProviders) {
|
||||||
monitor.beginTask("Refresh Executables", executableProviders.size());
|
monitor.beginTask("Refresh Executables", executableProviders.size());
|
||||||
for (IExecutableProvider provider : executableProviders) {
|
for (IExecutableProvider provider : executableProviders) {
|
||||||
|
@ -118,6 +120,8 @@ public class ExecutablesManager extends PlatformObject {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return monitor.isCanceled() ? Status.CANCEL_STATUS : Status.OK_STATUS;
|
return monitor.isCanceled() ? Status.CANCEL_STATUS : Status.OK_STATUS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -123,6 +123,7 @@ public class StandardExecutableProvider implements IResourceChangeListener, ICPr
|
||||||
}
|
}
|
||||||
|
|
||||||
public Collection<Executable> getExecutables(IProgressMonitor monitor) {
|
public Collection<Executable> getExecutables(IProgressMonitor monitor) {
|
||||||
|
synchronized (executables) {
|
||||||
executables.clear();
|
executables.clear();
|
||||||
|
|
||||||
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
|
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
|
||||||
|
@ -159,7 +160,7 @@ public class StandardExecutableProvider implements IResourceChangeListener, ICPr
|
||||||
monitor.worked(1);
|
monitor.worked(1);
|
||||||
}
|
}
|
||||||
monitor.done();
|
monitor.done();
|
||||||
|
}
|
||||||
return executables;
|
return executables;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue