aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse/plugins/com.android.ide.eclipse.adt/src/com
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2010-11-11 15:49:31 -0800
committerXavier Ducrohet <xav@android.com>2010-11-11 16:19:55 -0800
commitad11cf8ec9e9efcbfdb42e426a08af5423d28a3f (patch)
tree2fc1e2e34d88632857f20b3586078ccea39122e8 /eclipse/plugins/com.android.ide.eclipse.adt/src/com
parentd6c3d2b33c09c1fc16605f19689409b818345e3c (diff)
downloadsdk-ad11cf8ec9e9efcbfdb42e426a08af5423d28a3f.zip
sdk-ad11cf8ec9e9efcbfdb42e426a08af5423d28a3f.tar.gz
sdk-ad11cf8ec9e9efcbfdb42e426a08af5423d28a3f.tar.bz2
Change the adbLocation ddms extension to provide more tools location.
Previously DDMS used the adb location to find the location of other tools, but adb moved to a different tool folder. adbLocator extension changed to toolsLocation and provide explicit locations for all the tools DDMS cares about. This way the logic of the tools location is only in ADT instead of being duplicated in DDMS. Change-Id: I87f19c7705cb822dc793264f11e680ba09eb7f40
Diffstat (limited to 'eclipse/plugins/com.android.ide.eclipse.adt/src/com')
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdtPlugin.java8
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AndroidConstants.java4
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/ToolsLocator.java (renamed from eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdbLocator.java)14
3 files changed, 22 insertions, 4 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 44a9be5..b6ebfdd 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
@@ -226,7 +226,8 @@ public class AdtPlugin extends AbstractUIPlugin {
if (AdtPrefs.PREFS_SDK_DIR.equals(event.getProperty())) {
// finally restart adb, in case it's a different version
- DdmsPlugin.setAdb(getOsAbsoluteAdb(), true /* startAdb */);
+ DdmsPlugin.setToolsLocation(getOsAbsoluteAdb(), true /* startAdb */,
+ getOsAbsoluteHprofConv(), getOsAbsoluteTraceview());
// get the SDK location and build id.
if (checkSdkLocationAndId()) {
@@ -349,6 +350,11 @@ public class AdtPlugin extends AbstractUIPlugin {
return getOsSdkFolder() + getOsRelativeEmulator();
}
+ public static String getOsAbsoluteHprofConv() {
+ return getOsSdkFolder() + SdkConstants.OS_SDK_TOOLS_FOLDER +
+ AndroidConstants.FN_HPROF_CONV;
+ }
+
/** Returns the absolute proguard path */
public static String getOsAbsoluteProguard() {
return getOsSdkFolder() + getOsRelativeProguard();
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AndroidConstants.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AndroidConstants.java
index b1ccc28..a26374c 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AndroidConstants.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AndroidConstants.java
@@ -120,6 +120,10 @@ public class AndroidConstants {
(SdkConstants.CURRENT_PLATFORM == SdkConstants.PLATFORM_WINDOWS) ?
"traceview.exe" : "traceview"; //$NON-NLS-1$ //$NON-NLS-2$
+ public final static String FN_HPROF_CONV =
+ (SdkConstants.CURRENT_PLATFORM == SdkConstants.PLATFORM_WINDOWS) ?
+ "hprof-conv.exe" : "hprof-conv"; //$NON-NLS-1$ //$NON-NLS-2$
+
/** Absolute path of the workspace root, i.e. "/" */
public final static String WS_ROOT = WS_SEP;
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdbLocator.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/ToolsLocator.java
index 9c87f26..987acaf 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdbLocator.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/ToolsLocator.java
@@ -16,15 +16,23 @@
package com.android.ide.eclipse.adt;
-import com.android.ide.eclipse.ddms.IAdbLocator;
+import com.android.ide.eclipse.ddms.IToolsLocator;
/**
- * Implementation of the com.android.ide.ddms.adbLocator extension point.
+ * Implementation of the com.android.ide.ddms.toolsLocator extension point.
*
*/
-public class AdbLocator implements IAdbLocator {
+public class ToolsLocator implements IToolsLocator {
public String getAdbLocation() {
return AdtPlugin.getOsAbsoluteAdb();
}
+
+ public String getHprofConvLocation() {
+ return AdtPlugin.getOsAbsoluteHprofConv();
+ }
+
+ public String getTraceViewLocation() {
+ return AdtPlugin.getOsAbsoluteTraceview();
+ }
}