diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-10-19 17:24:34 -0400 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-10-19 17:24:34 -0400 |
commit | 4b85c08b422e23c0808232eded2e91c29cbed1f1 (patch) | |
tree | 28325509af4d4407f87e05263d2d69bc4e599944 /eclipse | |
parent | 706a64e84a81937fffde3c8dee61df2a77650811 (diff) | |
parent | 635e7791a5840d95212a0b62a4e3ec5eae0e16fa (diff) | |
download | sdk-4b85c08b422e23c0808232eded2e91c29cbed1f1.zip sdk-4b85c08b422e23c0808232eded2e91c29cbed1f1.tar.gz sdk-4b85c08b422e23c0808232eded2e91c29cbed1f1.tar.bz2 |
Merge change I1a00abb0 into eclair-sdk
* changes:
Fix a deadlock when ADT starts, starts building projects, and load the SDK at the same time.
Diffstat (limited to 'eclipse')
-rw-r--r-- | eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdtPlugin.java | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdtPlugin.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdtPlugin.java index a52599f..5d8b6c2 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdtPlugin.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdtPlugin.java @@ -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); + // 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); - // update the project that needs recompiling. - if (list.size() > 0) { - IJavaProject[] array = list.toArray( - new IJavaProject[list.size()]); - AndroidClasspathContainerInitializer.updateProjects(array); - } + list.addAll(mPostLoadProjectsToCheck); - progress.worked(10); + // 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 |