aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaphael <raphael@google.com>2010-03-29 15:38:04 -0700
committerRaphael <raphael@google.com>2010-03-29 16:00:35 -0700
commit1f05559a6c5e2c02da4d0978f32ab6df1b93db87 (patch)
treec630d87bdeddc78f148eb5e19faf100a4be84615
parent1a240c89989766cd1b1fc56bf689df2576c0ad05 (diff)
downloadsdk-1f05559a6c5e2c02da4d0978f32ab6df1b93db87.zip
sdk-1f05559a6c5e2c02da4d0978f32ab6df1b93db87.tar.gz
sdk-1f05559a6c5e2c02da4d0978f32ab6df1b93db87.tar.bz2
ADT: repo schema change tell users to update ADT, not tools.
SDK Bug 2438713 Change-Id: Ie6dfad20a606cea27e9ba5ef8a0a1b2afa479fa7
-rwxr-xr-xsdkmanager/libs/sdklib/src/com/android/sdklib/internal/repository/RepoSource.java24
1 files changed, 22 insertions, 2 deletions
diff --git a/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/repository/RepoSource.java b/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/repository/RepoSource.java
index 415cba5..dd590f6 100755
--- a/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/repository/RepoSource.java
+++ b/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/repository/RepoSource.java
@@ -249,9 +249,29 @@ public class RepoSource implements IDescription {
}
if (usingAlternateXml) {
- String info = "This repository requires a more recent version of the Tools. Please update.";
+
+ // Is the manager running from inside ADT?
+ // We check that com.android.ide.eclipse.adt.AdtPlugin exists using reflection.
+
+ boolean isADT = false;
+ try {
+ Class<?> adt = Class.forName("com.android.ide.eclipse.adt.AdtPlugin"); //$NON-NLS-1$
+ isADT = (adt != null);
+ } catch (ClassNotFoundException e) {
+ // pass
+ }
+
+ String info;
+ if (isADT) {
+ info = "This repository requires a more recent version of ADT. Please update the Eclipse Android plugin.";
+ mDescription = "This repository requires a more recent version of ADT, the Eclipse Android plugin.\nYou must update it before you can see other new packages.";
+
+ } else {
+ info = "This repository requires a more recent version of the Tools. Please update.";
+ mDescription = "This repository requires a more recent version of the Tools.\nYou must update it before you can see other new packages.";
+ }
+
mFetchError = mFetchError == null ? info : mFetchError + ". " + info;
- mDescription = "This repository requires a more recent version of the Tools.\nYou must update it before you can see other new packages.";
}
monitor.incProgress(1);