aboutsummaryrefslogtreecommitdiff
path: root/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2010-09-07 17:25:55 -0700
committerXavier Ducrohet <xav@android.com>2010-09-07 19:56:28 -0700
commite59c27340904879f204f4a702bf91b9554e0f8e2 (patch)
treee059a7d0fb88ef78ba1b1a385a49113a81b5b0fc /eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android
parent8987385f7ab95e6e92910cf18ed8bc40cb39252d (diff)
downloadsdk-e59c27340904879f204f4a702bf91b9554e0f8e2.tar.gz
PDT implements the new extension from ddms
Change-Id: I9622deec64ca60b9bfc2a4cdfa640821123ad4c0
Diffstat (limited to 'eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android')
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/DdmsPlugin.java30
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/IDebuggerConnector.java5
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/DeviceView.java12
3 files changed, 31 insertions, 16 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/DdmsPlugin.java b/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/DdmsPlugin.java
index 84274544c..7d2c36ba4 100644
--- a/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/DdmsPlugin.java
+++ b/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/DdmsPlugin.java
@@ -261,16 +261,20 @@ public final class DdmsPlugin extends AbstractUIPlugin implements IDeviceChangeL
IAdbLocator[] locators = instantiateAdbLocators(elements);
for (IAdbLocator locator : locators) {
- String adbLocation = locator.getAdbLocation();
- if (adbLocation != null) {
- // checks if the location is valid.
- if (setAdbLocation(adbLocation)) {
- AndroidDebugBridge.createBridge(sAdbLocation,
- true /* forceNewBridge */);
-
- // no need to look at the other locators.
- break;
+ try {
+ String adbLocation = locator.getAdbLocation();
+ if (adbLocation != null) {
+ // checks if the location is valid.
+ if (setAdbLocation(adbLocation)) {
+ AndroidDebugBridge.createBridge(sAdbLocation,
+ true /* forceNewBridge */);
+
+ // no need to look at the other locators.
+ break;
+ }
}
+ } catch (Throwable t) {
+ // ignore, we'll just not use this implementation.
}
}
@@ -711,8 +715,12 @@ public final class DdmsPlugin extends AbstractUIPlugin implements IDeviceChangeL
// loop on all source revealer till one succeeds
if (mSourceRevealers != null) {
for (ISourceRevealer revealer : mSourceRevealers) {
- if (revealer.reveal(applicationName, className, line)) {
- break;
+ try {
+ if (revealer.reveal(applicationName, className, line)) {
+ break;
+ }
+ } catch (Throwable t) {
+ // ignore, we'll just not use this implementation.
}
}
}
diff --git a/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/IDebuggerConnector.java b/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/IDebuggerConnector.java
index c50ba307a..b271dd89e 100644
--- a/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/IDebuggerConnector.java
+++ b/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/IDebuggerConnector.java
@@ -29,9 +29,10 @@ public interface IDebuggerConnector {
* "selected" port can also be used if needed.
* @param appName the name of the application. Usually the application's package but this
* can be different if the component was setup to run in it's own process.
- * @param port the preferred connection port.
+ * @param appPort the preferred connection port.
+ * @param selectedPort the port value for the selected application
* @return true if success.
*/
- boolean connectDebugger(String appName, int port);
+ boolean connectDebugger(String appName, int appPort, int selectedPort);
}
diff --git a/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/DeviceView.java b/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/DeviceView.java
index 6ddb62dff..0fa33d293 100644
--- a/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/DeviceView.java
+++ b/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/DeviceView.java
@@ -20,6 +20,7 @@ package com.android.ide.eclipse.ddms.views;
import com.android.ddmlib.AndroidDebugBridge;
import com.android.ddmlib.Client;
import com.android.ddmlib.ClientData;
+import com.android.ddmlib.DdmPreferences;
import com.android.ddmlib.IDevice;
import com.android.ddmlib.SyncException;
import com.android.ddmlib.SyncService;
@@ -421,9 +422,14 @@ public class DeviceView extends ViewPart implements IUiSelectionListener, IClien
if (connectors != null) {
for (IDebuggerConnector connector : connectors) {
- if (connector.connectDebugger(packageName,
- currentClient.getDebuggerListenPort())) {
- return;
+ try {
+ if (connector.connectDebugger(packageName,
+ currentClient.getDebuggerListenPort(),
+ DdmPreferences.getSelectedDebugPort())) {
+ return;
+ }
+ } catch (Throwable t) {
+ // ignore, we'll just not use this implementation
}
}
}