diff options
author | Tor Norbye <tnorbye@google.com> | 2012-10-22 14:35:54 -0700 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2012-10-22 14:35:54 -0700 |
commit | 44f85d1834708fb0031f0b941c5b66e3f66e0674 (patch) | |
tree | 450982af708e44a1e6f45dbef342a86561c3595c | |
parent | 8cf807a3f15931accf414eb6b94a6e3a96fe9818 (diff) | |
parent | df23dac52a3af6e7e4dd485072a125ab3794d9ac (diff) | |
download | sdk-44f85d1834708fb0031f0b941c5b66e3f66e0674.zip sdk-44f85d1834708fb0031f0b941c5b66e3f66e0674.tar.gz sdk-44f85d1834708fb0031f0b941c5b66e3f66e0674.tar.bz2 |
Merge "Don't warn about missing SDK when bundled"
2 files changed, 18 insertions, 9 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 e08d7ea..af6f20a 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 @@ -46,6 +46,7 @@ import com.android.ide.eclipse.adt.internal.resources.manager.ResourceManager; import com.android.ide.eclipse.adt.internal.sdk.Sdk; import com.android.ide.eclipse.adt.internal.sdk.Sdk.ITargetChangeListener; import com.android.ide.eclipse.adt.internal.ui.EclipseUiHelper; +import com.android.ide.eclipse.base.InstallDetails; import com.android.ide.eclipse.ddms.DdmsPlugin; import com.android.io.StreamException; import com.android.resources.ResourceFolderType; @@ -266,14 +267,16 @@ public class AdtPlugin extends AbstractUIPlugin implements ILogger { // Listen on resource file edits for updates to file inclusion IncludeFinder.start(); - // Parse the SDK content. - // This is deferred in separate jobs to avoid blocking the bundle start. - final boolean isSdkLocationValid = checkSdkLocationAndId(); - if (isSdkLocationValid) { - // parse the SDK resources. - // Wait 2 seconds before starting the job. This leaves some time to the - // other bundles to initialize. - parseSdkContent(2000 /*milliseconds*/); + if (!InstallDetails.isAndroidIdePackage()) { + // Parse the SDK content. + // This is deferred in separate jobs to avoid blocking the bundle start. + final boolean isSdkLocationValid = checkSdkLocationAndId(); + if (isSdkLocationValid) { + // parse the SDK resources. + // Wait 2 seconds before starting the job. This leaves some time to the + // other bundles to initialize. + parseSdkContent(2000 /*milliseconds*/); + } } } @@ -1366,8 +1369,10 @@ public class AdtPlugin extends AbstractUIPlugin implements ILogger { /** * Parses the SDK resources. + * + * @param delay the delay to wait before starting the parsing job */ - private void parseSdkContent(long delay) { + public void parseSdkContent(long delay) { // Perform the update in a thread (here an Eclipse runtime job) // since this should never block the caller (especially the start method) Job job = new Job(Messages.AdtPlugin_Android_SDK_Content_Loader) { diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/welcome/AdtStartup.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/welcome/AdtStartup.java index 8d8b688..206c4f5 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/welcome/AdtStartup.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/welcome/AdtStartup.java @@ -109,6 +109,10 @@ public class AdtStartup implements IStartup, IWindowListener { if (AdtPlugin.getDefault().checkSdkLocationAndId(osSdkPath, new SdkValidator())) { AdtPrefs.getPrefs().setSdkLocation(new File(osSdkPath)); + // parse the SDK resources. + // Wait 2 seconds before starting the job. This leaves some time to the + // other bundles to initialize. + AdtPlugin.getDefault().parseSdkContent(2000 /*milliseconds*/); } } } |