diff options
| author | Xavier Ducrohet <xav@android.com> | 2009-10-19 12:56:57 -0700 |
|---|---|---|
| committer | Xavier Ducrohet <xav@android.com> | 2009-10-19 12:56:57 -0700 |
| commit | 1a00abb0ae4e98832e3c5a1a06527d244071d905 (patch) | |
| tree | d2593a410bcf97c2cc90e22739e1188d3b1f91f9 /tools | |
| parent | a8baf9bcc8d9776e9aba35207af17723f7226027 (diff) | |
| download | android_development-1a00abb0ae4e98832e3c5a1a06527d244071d905.tar.gz android_development-1a00abb0ae4e98832e3c5a1a06527d244071d905.tar.bz2 android_development-1a00abb0ae4e98832e3c5a1a06527d244071d905.zip | |
Fix a deadlock when ADT starts, starts building projects, and load the SDK at the same time.
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/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/tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdtPlugin.java b/tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdtPlugin.java index a52599fae..5d8b6c25a 100644 --- a/tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdtPlugin.java +++ b/tools/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 |
