aboutsummaryrefslogtreecommitdiffstats
path: root/ddms/libs
diff options
context:
space:
mode:
authorSiva Velusamy <vsiva@google.com>2011-11-28 11:54:08 -0800
committerSiva Velusamy <vsiva@google.com>2011-11-28 11:54:08 -0800
commit3d5023281eb5d275fc66ab72b8f214bdb42280cd (patch)
treebde8363160c9330d8b504c0e6c7aca8b1ab14646 /ddms/libs
parentdf62b084badca9ff62f393109f8efb14e33f2d48 (diff)
downloadsdk-3d5023281eb5d275fc66ab72b8f214bdb42280cd.zip
sdk-3d5023281eb5d275fc66ab72b8f214bdb42280cd.tar.gz
sdk-3d5023281eb5d275fc66ab72b8f214bdb42280cd.tar.bz2
logcat: fix tooltip shift distance
Fix for http://code.google.com/p/android/issues/detail?id=22111 which is OS X Lion specific. This fix hasn't actually been tested on OS X Lion! Change-Id: Ifb4397e1482ebacc84cd90e83bb6837b883fbd08
Diffstat (limited to 'ddms/libs')
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatMessageLabelProvider.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatMessageLabelProvider.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatMessageLabelProvider.java
index 28af776..1d83a9c 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatMessageLabelProvider.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatMessageLabelProvider.java
@@ -22,6 +22,7 @@ import org.eclipse.jface.viewers.ColumnLabelProvider;
import org.eclipse.jface.viewers.ViewerCell;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.Point;
/**
* A JFace Column label provider for the LogCat log messages. It expects elements of type
@@ -42,6 +43,9 @@ public final class LogCatMessageLabelProvider extends ColumnLabelProvider {
private static final Color WARN_MSG_COLOR = new Color(null, 255, 127, 0);
private static final Color VERBOSE_MSG_COLOR = new Color(null, 0, 0, 0);
+ /** Amount of pixels to shift the tooltip by. */
+ private static final Point LOGCAT_TOOLTIP_SHIFT = new Point(10, 10);
+
private Font mLogFont;
private int mWrapWidth = 100;
@@ -130,4 +134,11 @@ public final class LogCatMessageLabelProvider extends ColumnLabelProvider {
return null;
}
}
+
+ @Override
+ public Point getToolTipShift(Object object) {
+ // The only reason we override this method is that the default shift amounts
+ // don't seem to work on OS X Lion.
+ return LOGCAT_TOOLTIP_SHIFT;
+ }
}