Merge change I1a00abb0 into eclair-sdk

* changes:
  Fix a deadlock when ADT starts, starts building projects, and load the SDK at the same time.
This commit is contained in:
Android (Google) Code Review
2009-10-19 17:24:34 -04:00

View File

@@ -1045,12 +1045,12 @@ public class AdtPlugin extends AbstractUIPlugin {
}
}
ArrayList<IJavaProject> list = new ArrayList<IJavaProject>();
synchronized (getSdkLockObject()) {
mSdkIsLoaded = LoadStatus.LOADED;
progress.setTaskName("Check Projects");
ArrayList<IJavaProject> list = new ArrayList<IJavaProject>();
for (IJavaProject javaProject : mPostLoadProjectsToResolve) {
if (javaProject.getProject().isOpen()) {
list.add(javaProject);
@@ -1059,24 +1059,24 @@ public class AdtPlugin extends AbstractUIPlugin {
// done with this list.
mPostLoadProjectsToResolve.clear();
// check the projects that need checking.
// The method modifies the list (it removes the project that
// do not need to be resolved again).
AndroidClasspathContainerInitializer.checkProjectsCache(
mPostLoadProjectsToCheck);
list.addAll(mPostLoadProjectsToCheck);
// update the project that needs recompiling.
if (list.size() > 0) {
IJavaProject[] array = list.toArray(
new IJavaProject[list.size()]);
AndroidClasspathContainerInitializer.updateProjects(array);
}
progress.worked(10);
}
// check the projects that need checking.
// The method modifies the list (it removes the project that
// do not need to be resolved again).
AndroidClasspathContainerInitializer.checkProjectsCache(
mPostLoadProjectsToCheck);
list.addAll(mPostLoadProjectsToCheck);
// update the project that needs recompiling.
if (list.size() > 0) {
IJavaProject[] array = list.toArray(
new IJavaProject[list.size()]);
AndroidClasspathContainerInitializer.updateProjects(array);
}
progress.worked(10);
}
// Notify resource changed listeners