aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti2012-12-07 11:22:42 (EST)
committerBogdan Gheorghe2012-12-07 11:33:35 (EST)
commit232d48f0598561e1608d073aedfacd5ba3bae7fc (patch)
tree2df17adfd541e16edd271dc18a7b0c218da77b5c
parent06681aff359dac7ca29747c7c2b20038fa41772c (diff)
downloadeclipse.platform.swt-232d48f0598561e1608d073aedfacd5ba3bae7fc.zip
eclipse.platform.swt-232d48f0598561e1608d073aedfacd5ba3bae7fc.tar.gz
eclipse.platform.swt-232d48f0598561e1608d073aedfacd5ba3bae7fc.tar.bz2
Bug 395464 - Eclipse freezes when hovering over value in Variables viewv3659iv3659h
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
index 60cb2cf..8bbaf16 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
@@ -53,6 +53,8 @@ public class Composite extends Scrollable {
Control [] tabList;
int layoutCount, backgroundMode;
+ static final int TOOLTIP_LIMIT = 4096;
+
/**
* Prevents uninitialized instances from being created outside the package.
*/
@@ -1846,6 +1848,15 @@ LRESULT wmNotify (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
if (string != null) {
Shell shell = getShell ();
string = Display.withCrLf (string);
+ /*
+ * Bug in Windows. On Windows 7, tool tips hang when displaying large
+ * strings. The fix is to limit the tool tip string to 4Kb.
+ */
+ if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
+ if (string.length() > TOOLTIP_LIMIT) {
+ string = string.substring(0, TOOLTIP_LIMIT);
+ }
+ }
char [] chars = fixMnemonic (string);
/*