diff options
author | Xavier Ducrohet <xav@android.com> | 2010-09-01 18:12:52 -0700 |
---|---|---|
committer | Android Code Review <code-review@android.com> | 2010-09-01 18:12:52 -0700 |
commit | c6613461499d0a812ce1bcf7dd72df6f02010417 (patch) | |
tree | 5f1d02f101e6386455978b8cbf04cf587fee788b /eclipse/plugins | |
parent | 89d4a48e5fbedf1fc404dd00a3e68b5cade1309a (diff) | |
parent | 490f6b730eeaf040f1f58130b839600bea1cf709 (diff) | |
download | sdk-c6613461499d0a812ce1bcf7dd72df6f02010417.zip sdk-c6613461499d0a812ce1bcf7dd72df6f02010417.tar.gz sdk-c6613461499d0a812ce1bcf7dd72df6f02010417.tar.bz2 |
Merge "Fix Hierarchy viewer plug-in again."
Diffstat (limited to 'eclipse/plugins')
-rw-r--r-- | eclipse/plugins/com.android.ide.eclipse.hierarchyviewer/src/com/android/ide/eclipse/hierarchyviewer/HierarchyViewerPlugin.java | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.hierarchyviewer/src/com/android/ide/eclipse/hierarchyviewer/HierarchyViewerPlugin.java b/eclipse/plugins/com.android.ide.eclipse.hierarchyviewer/src/com/android/ide/eclipse/hierarchyviewer/HierarchyViewerPlugin.java index 959bf6c..978cfac 100644 --- a/eclipse/plugins/com.android.ide.eclipse.hierarchyviewer/src/com/android/ide/eclipse/hierarchyviewer/HierarchyViewerPlugin.java +++ b/eclipse/plugins/com.android.ide.eclipse.hierarchyviewer/src/com/android/ide/eclipse/hierarchyviewer/HierarchyViewerPlugin.java @@ -115,10 +115,7 @@ public class HierarchyViewerPlugin extends AbstractUIPlugin { new Thread() { @Override public void run() { - if (director.acquireBridge()) { - director.startListenForDevices(); - director.populateDeviceSelectionModel(); - } + initDirector(director); } }.start(); } @@ -167,15 +164,23 @@ public class HierarchyViewerPlugin extends AbstractUIPlugin { new Thread() { @Override public void run() { - HierarchyViewerDirector.getDirector().initDebugBridge(); - HierarchyViewerDirector.getDirector().startListenForDevices(); - HierarchyViewerDirector.getDirector().populateDeviceSelectionModel(); + initDirector(HierarchyViewerDirector.getDirector()); } }.start(); } } } + private static boolean initDirector(HierarchyViewerDirector director) { + if (director.acquireBridge()) { + director.startListenForDevices(); + director.populateDeviceSelectionModel(); + return true; + } + + return false; + } + /** * Prints a message, associated with a project to the specified stream * |