aboutsummaryrefslogtreecommitdiffstats
path: root/ddms
diff options
context:
space:
mode:
Diffstat (limited to 'ddms')
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogPanel.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogPanel.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogPanel.java
index 154e2fa..82c1259 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogPanel.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogPanel.java
@@ -1568,4 +1568,17 @@ public class LogPanel extends SelectionDependentPanel {
mEditFilterAction.setEnabled(selectedFilter.supportsEdit());
}
}
+
+ public String getSelectedErrorLineMessage() {
+ Table table = mCurrentFilter.getTable();
+ int[] selection = table.getSelectionIndices();
+
+ if (selection.length == 1) {
+ TableItem item = table.getItem(selection[0]);
+ LogMessage msg = (LogMessage)item.getData();
+ if (msg.data.logLevel == LogLevel.ERROR || msg.data.logLevel == LogLevel.WARN)
+ return msg.msg;
+ }
+ return null;
+ }
}