OSDN Git Service

Display SDK/plug-in incompatibility messages.
authorXavier Ducrohet <xav@android.com>
Fri, 8 Oct 2010 22:39:04 +0000 (15:39 -0700)
committerXavier Ducrohet <xav@android.com>
Sun, 10 Oct 2010 19:57:40 +0000 (12:57 -0700)
Hmm this used to work. But the lines displaying the error
messages are gone...

Change-Id: I83cf7d3e8a471fe6b2166818db9fad4f60d3d392

eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdtPlugin.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/VersionCheck.java
files/plugin.prop

index c4aaebd..4bd5121 100644 (file)
@@ -744,11 +744,13 @@ public class AdtPlugin extends AbstractUIPlugin {
         return checkSdkLocationAndId(sdkLocation, new CheckSdkErrorHandler() {
             @Override
             public boolean handleError(String message) {
+                AdtPlugin.displayError("Android SDK Verification", message);
                 return false;
             }
 
             @Override
             public boolean handleWarning(String message) {
+                AdtPlugin.displayWarning("Android SDK Verification", message);
                 return true;
             }
         });
@@ -780,7 +782,14 @@ public class AdtPlugin extends AbstractUIPlugin {
                             SdkConstants.FD_TOOLS, osSdkLocation));
         }
 
-        // check the path to various tools we use
+        // first check the min plug-in requirement as its error message is easier to figure
+        // out for the user
+        if (VersionCheck.checkVersion(osSdkLocation, errorHandler) == false) {
+            return false;
+        }
+
+        // check the path to various tools we use to make sure nothing is missing. This is
+        // not meant to be exhaustive.
         String[] filesToCheck = new String[] {
                 osSdkLocation + getOsRelativeAdb(),
                 osSdkLocation + getOsRelativeEmulator()
@@ -791,8 +800,7 @@ public class AdtPlugin extends AbstractUIPlugin {
             }
         }
 
-        // check the SDK build id/version and the plugin version.
-        return VersionCheck.checkVersion(osSdkLocation, errorHandler);
+        return true;
     }
 
     /**
index 6199ef9..4ddc87f 100644 (file)
@@ -107,7 +107,7 @@ public final class VersionCheck {
         }
 
         if (valid == false) {
-            return errorHandler.handleWarning(
+            return errorHandler.handleError(
                     String.format(Messages.VersionCheck_Plugin_Too_Old,
                             minMajorVersion, minMinorVersion, minMicroVersion, versionString));
         }
index a24b984..7d50146 100644 (file)
@@ -1,3 +1,3 @@
 # begin plugin.prop
-plugin.version=0.9.6
+plugin.version=8.0.0
 # end plugin.prop
\ No newline at end of file