aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse/plugins/com.android.ide.eclipse.monitor
diff options
context:
space:
mode:
Diffstat (limited to 'eclipse/plugins/com.android.ide.eclipse.monitor')
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.monitor/.classpath1
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.monitor/META-INF/MANIFEST.MF3
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.monitor/build.properties3
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.monitor/src/com/android/ide/eclipse/monitor/MonitorApplication.java12
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.monitor/src/com/android/ide/eclipse/monitor/SdkToolsLocator.java2
5 files changed, 18 insertions, 3 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.monitor/.classpath b/eclipse/plugins/com.android.ide.eclipse.monitor/.classpath
index 9642053..1be4b68 100644
--- a/eclipse/plugins/com.android.ide.eclipse.monitor/.classpath
+++ b/eclipse/plugins/com.android.ide.eclipse.monitor/.classpath
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
+ <classpathentry exported="true" kind="lib" path="libs/sdkuilib.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
diff --git a/eclipse/plugins/com.android.ide.eclipse.monitor/META-INF/MANIFEST.MF b/eclipse/plugins/com.android.ide.eclipse.monitor/META-INF/MANIFEST.MF
index 2a2a405..047072b 100644
--- a/eclipse/plugins/com.android.ide.eclipse.monitor/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/com.android.ide.eclipse.monitor/META-INF/MANIFEST.MF
@@ -11,6 +11,7 @@ Require-Bundle: org.eclipse.ui,
com.android.ide.eclipse.base
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %Bundle-Vendor
-Bundle-ClassPath: .
+Bundle-ClassPath: .,
+ libs/sdkuilib.jar
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/eclipse/plugins/com.android.ide.eclipse.monitor/build.properties b/eclipse/plugins/com.android.ide.eclipse.monitor/build.properties
index 44471de..a2a2a99 100644
--- a/eclipse/plugins/com.android.ide.eclipse.monitor/build.properties
+++ b/eclipse/plugins/com.android.ide.eclipse.monitor/build.properties
@@ -7,4 +7,5 @@ bin.includes = META-INF/,\
plugin_customization.ini,\
plugin.properties,\
images/,\
- splash.bmp
+ splash.bmp,\
+ libs/sdkuilib.jar
diff --git a/eclipse/plugins/com.android.ide.eclipse.monitor/src/com/android/ide/eclipse/monitor/MonitorApplication.java b/eclipse/plugins/com.android.ide.eclipse.monitor/src/com/android/ide/eclipse/monitor/MonitorApplication.java
index 27fcdd9..5f87813 100644
--- a/eclipse/plugins/com.android.ide.eclipse.monitor/src/com/android/ide/eclipse/monitor/MonitorApplication.java
+++ b/eclipse/plugins/com.android.ide.eclipse.monitor/src/com/android/ide/eclipse/monitor/MonitorApplication.java
@@ -18,7 +18,11 @@ package com.android.ide.eclipse.monitor;
import com.android.ide.eclipse.monitor.SdkToolsLocator.SdkInstallStatus;
import com.android.prefs.AndroidLocation;
+import com.android.sdklib.ISdkLog;
+import com.android.sdklib.NullSdkLog;
+import com.android.sdklib.SdkManager;
import com.android.sdkstats.SdkStatsService;
+import com.android.sdkuilib.internal.repository.sdkman2.AdtUpdateDialog;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
@@ -55,6 +59,14 @@ public class MonitorApplication implements IApplication {
}
MonitorPlugin.getDefault().setSdkPath(sdkPath);
+ // install platform tools if necessary
+ ISdkLog sdkLog = new NullSdkLog();
+ SdkManager manager = SdkManager.createManager(sdkPath, sdkLog);
+ if (manager.getPlatformToolsVersion() == null) {
+ AdtUpdateDialog window = new AdtUpdateDialog(new Shell(display), sdkLog, sdkPath);
+ window.installPlatformTools();
+ }
+
// If this is the first time using ddms or adt, open up the stats service
// opt out dialog, and request user for permissions.
// Note that the actual ping is performed in MonitorStartup
diff --git a/eclipse/plugins/com.android.ide.eclipse.monitor/src/com/android/ide/eclipse/monitor/SdkToolsLocator.java b/eclipse/plugins/com.android.ide.eclipse.monitor/src/com/android/ide/eclipse/monitor/SdkToolsLocator.java
index ba87c7b..19e1a43 100644
--- a/eclipse/plugins/com.android.ide.eclipse.monitor/src/com/android/ide/eclipse/monitor/SdkToolsLocator.java
+++ b/eclipse/plugins/com.android.ide.eclipse.monitor/src/com/android/ide/eclipse/monitor/SdkToolsLocator.java
@@ -73,7 +73,7 @@ public class SdkToolsLocator {
}
public SdkInstallStatus isValidInstallation() {
- List<String> executables = Arrays.asList(getAdbLocation(),
+ List<String> executables = Arrays.asList(
getTraceViewLocation(),
getHprofConvLocation());