aboutsummaryrefslogtreecommitdiffstats
path: root/ddms/app
diff options
context:
space:
mode:
authorSiva Velusamy <vsiva@google.com>2011-08-03 11:19:33 -0700
committerSiva Velusamy <vsiva@google.com>2011-08-04 11:59:18 -0700
commit2ecd3a82201d03a35ab124f466941dce4d4be637 (patch)
tree95d678af931b07bf45b46140f909b60b26b0361f /ddms/app
parentc4c3f16bedc1049d1888d34d27de13b3f6cce55a (diff)
downloadsdk-2ecd3a82201d03a35ab124f466941dce4d4be637.zip
sdk-2ecd3a82201d03a35ab124f466941dce4d4be637.tar.gz
sdk-2ecd3a82201d03a35ab124f466941dce4d4be637.tar.bz2
Initial implementation of the new logcat panel.
This logcat panel will show up in ddms if it is launched with -Dcom.android.ddms.useNewLogCatView. Currently, this implementation only displays a table with a list of logcat messages. It lacks features such as filters, go-to source of exception, export to log, user preferences, etc. Future patches should enhance the UI to achieve feature parity with older UI. Change-Id: I3dde3c590c839318ce57bb5f005627f580ebb06c
Diffstat (limited to 'ddms/app')
-rw-r--r--ddms/app/src/com/android/ddms/UIThread.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/ddms/app/src/com/android/ddms/UIThread.java b/ddms/app/src/com/android/ddms/UIThread.java
index 9931a93..c9dc2b1 100644
--- a/ddms/app/src/com/android/ddms/UIThread.java
+++ b/ddms/app/src/com/android/ddms/UIThread.java
@@ -46,6 +46,8 @@ import com.android.ddmuilib.explorer.DeviceExplorer;
import com.android.ddmuilib.handler.BaseFileHandler;
import com.android.ddmuilib.handler.MethodProfilingHandler;
import com.android.ddmuilib.log.event.EventLogPanel;
+import com.android.ddmuilib.logcat.LogCatPanel;
+import com.android.ddmuilib.logcat.LogCatReceiver;
import com.android.ddmuilib.logcat.LogColors;
import com.android.ddmuilib.logcat.LogFilter;
import com.android.ddmuilib.logcat.LogPanel;
@@ -232,6 +234,7 @@ public class UIThread implements IUiSelectionListener, IClientChangeListener {
}
private LogPanel mLogPanel; /* only valid when useOldLogCatView() == true */
+ private LogCatPanel mLogCatPanel; /* only valid when useOldLogCatView() == false */
private ToolItemAction mCreateFilterAction;
private ToolItemAction mDeleteFilterAction;
@@ -959,6 +962,8 @@ public class UIThread implements IUiSelectionListener, IClientChangeListener {
if (useOldLogCatView()) {
createBottomPanel(bottomPanel);
+ } else {
+ createLogCatView(bottomPanel);
}
// form layout data
@@ -1359,6 +1364,15 @@ public class UIThread implements IUiSelectionListener, IClientChangeListener {
mLogPanel.startLogCat(mCurrentDevice);
}
+ private void createLogCatView(Composite parent) {
+ mLogCatPanel = new LogCatPanel(new LogCatReceiver());
+ mLogCatPanel.createPanel(parent);
+
+ if (mCurrentDevice != null) {
+ mLogCatPanel.deviceSelected(mCurrentDevice);
+ }
+ }
+
/*
* Create the contents of the left panel: a table of VMs.
*/
@@ -1701,6 +1715,8 @@ public class UIThread implements IUiSelectionListener, IClientChangeListener {
mEmulatorPanel.deviceSelected(mCurrentDevice);
if (useOldLogCatView()) {
mLogPanel.deviceSelected(mCurrentDevice);
+ } else {
+ mLogCatPanel.deviceSelected(mCurrentDevice);
}
if (mEventLogPanel != null) {
mEventLogPanel.deviceSelected(mCurrentDevice);