update javadoc for MenuItem.setToolTipText()
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java
index e746f06..8cf7106 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java
@@ -849,6 +849,11 @@
* the tool tip text to an empty string replaces the default,
* causing no tool tip text to be shown.
* <p>
+ * The mnemonic indicator (character '&') is not displayed in a tool tip.
+ * To display a single '&' in the tool tip, the character '&' can be
+ * escaped by doubling it in the string.
+ * </p>
+ * <p>
* NOTE: Setting tooltips doesn't work for Menu items in the main menubar
* on Mac and Ubuntu Unity desktop.
* </p>
@@ -868,7 +873,6 @@
toolTipText = null;
nsItem.setToolTip (null);
}
- /*TODO: call fixMnemonic() on toolTip */
if (toolTip == null || toolTip.trim().length() == 0 || toolTip.equals(toolTipText)) return;
toolTipText = toolTip;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java
index 8ba5346..fa1105d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java
@@ -954,6 +954,11 @@
* the tool tip text to an empty string replaces the default,
* causing no tool tip text to be shown.
* <p>
+ * The mnemonic indicator (character '&') is not displayed in a tool tip.
+ * To display a single '&' in the tool tip, the character '&' can be
+ * escaped by doubling it in the string.
+ * </p>
+ * <p>
* NOTE: Setting tooltip doesn't work for menu items in the main menubar
* on Mac and Ubuntu Unity desktop.
* </p>
@@ -969,7 +974,6 @@
*/
public void setToolTipText (String toolTip) {
checkWidget();
- /*TODO: call fixMnemonic() on toolTip */
if (toolTip != null && (toolTip.trim().length() == 0 || toolTip.equals (toolTipText))) return;
this.parent.getShell().setToolTipText (handle, (toolTipText = toolTip));
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java
index 34ba098..e9dce5f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java
@@ -1178,6 +1178,11 @@
* the tool tip text to an empty string replaces the default,
* causing no tool tip text to be shown.
* <p>
+ * The mnemonic indicator (character '&') is not displayed in a tool tip.
+ * To display a single '&' in the tool tip, the character '&' can be
+ * escaped by doubling it in the string.
+ * </p>
+ * <p>
* NOTE: Setting tooltips doesn't work for Menu items in the main menubar
* on Mac and Ubuntu Unity desktop.
* </p>
@@ -1198,7 +1203,6 @@
itemToolTip = null;
}
- /*TODO: call fixMnemonic() on toolTip */
if (toolTip == null || toolTip.trim().length() == 0
|| (itemToolTip != null && toolTip.equals(itemToolTip.getMessage()))) return;