aboutsummaryrefslogtreecommitdiffstats
path: root/ddms
diff options
context:
space:
mode:
authorPierre Zurek <pierrezurek@gmail.com>2010-09-26 22:19:35 +0200
committerPierre Zurek <pierrezurek@gmail.com>2010-10-08 01:05:26 +0200
commit0b607f02d3328705cc9298550ab4556dc2550249 (patch)
treed441a9702b0e4e45332308ff88cd35792404f696 /ddms
parent65653cf3a59c53119616ef6578391ea1fcfffab7 (diff)
downloadsdk-0b607f02d3328705cc9298550ab4556dc2550249.zip
sdk-0b607f02d3328705cc9298550ab4556dc2550249.tar.gz
sdk-0b607f02d3328705cc9298550ab4556dc2550249.tar.bz2
Go to problem in source from Logcat via Double-click.
The user can choose in the LogCat Preference Page what will be the default behaviour (go to method declaration or go to error line). There are now 2 available actions in the LogCat View instead of the unique "Go to Problem" (which is now called "Go to Problem (method declaration)"). Change-Id: I769771b29d26b625cfd0250fa23e6627821be16d
Diffstat (limited to 'ddms')
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogPanel.java20
1 files changed, 20 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 180af4c..80e24d3 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogPanel.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogPanel.java
@@ -195,6 +195,8 @@ public class LogPanel extends SelectionDependentPanel {
private ITableFocusListener mGlobalListener;
+ private LogCatViewInterface mLogCatViewInterface = null;
+
/** message data, separated from content for multi line messages */
protected static class LogMessage {
public LogMessageInfo data;
@@ -313,6 +315,12 @@ public class LogPanel extends SelectionDependentPanel {
}
+ /**
+ * Interface implemented by the LogCatView in Eclipse for particular action on double-click.
+ */
+ public interface LogCatViewInterface {
+ public void onDoubleClick();
+ }
/**
* Create the log view with some default parameters
@@ -910,6 +918,14 @@ public class LogPanel extends SelectionDependentPanel {
// create the ui, first the table
final Table t = new Table(top, SWT.MULTI | SWT.FULL_SELECTION);
+ t.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+ if (mLogCatViewInterface != null) {
+ mLogCatViewInterface.onDoubleClick();
+ }
+ }
+ });
if (mDisplayFont != null) {
t.setFont(mDisplayFont);
@@ -1581,4 +1597,8 @@ public class LogPanel extends SelectionDependentPanel {
}
return null;
}
+
+ public void setLogCatViewInterface(LogCatViewInterface i) {
+ mLogCatViewInterface = i;
+ }
}