Bug 378008 - Toggle breakpoint modifier string is not shown on Mac
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java
index 33f47b7..4e6a8d0 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java
@@ -78,6 +78,7 @@
 import org.eclipse.debug.ui.IDebugModelPresentation;
 import org.eclipse.debug.ui.IDebugUIConstants;
 import org.eclipse.debug.ui.ILaunchGroup;
+import org.eclipse.jface.bindings.keys.KeyStroke;
 import org.eclipse.jface.dialogs.ErrorDialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.MessageDialogWithToggle;
@@ -964,6 +965,21 @@
 	 */
 	public void launchRemoved(ILaunch launch) {}
 
+	/**
+	 * Formats the given key stroke or click name and the modifier keys 
+	 * to a key binding string that can be used in action texts. 
+	 * 
+	 * @param modifierKeys the modifier keys
+	 * @param keyOrClick a key stroke or click, e.g. "Double Click"
+	 * @return the formatted keyboard shortcut string, e.g. "Shift+Double Click"
+	 * 
+	 * @since 3.8
+	 */
+	public static final String formatKeyBindingString(int modifierKeys, String keyOrClick) {
+		// this should actually all be delegated to KeyStroke class
+		return KeyStroke.getInstance(modifierKeys, KeyStroke.NO_KEY).format() + keyOrClick; 
+	}
+
 	public static boolean DEBUG_TEST_PRESENTATION_ID(IPresentationContext context) {
 	    if (context == null) {
 	        return true;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.properties
index 7a9e319..317d81f 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.properties
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.properties
@@ -162,7 +162,7 @@
 RulerEnableDisableBreakpointAction_1=Failed to toggle breakpoint enablement
 RulerEnableDisableBreakpointAction_2=&Disable Breakpoint
 RulerEnableDisableBreakpointAction_3=&Enable Breakpoint
-RulerEnableDisableBreakpointAction_4=Shift+Double Click
+RulerEnableDisableBreakpointAction_4=Double Click
 TerminateAndRelaunchAction_0=org.eclipse.debug.ui.commands.TerminateAndRelaunch
 TerminateAndRelaunchAction_3=Terminate and Relaunch
 TerminateAndRelaunchAction_4=Terminate and Relaunch
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RulerEnableDisableBreakpointAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RulerEnableDisableBreakpointAction.java
index fb19c1a..a37f31e 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RulerEnableDisableBreakpointAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RulerEnableDisableBreakpointAction.java
@@ -16,6 +16,7 @@
 import org.eclipse.debug.internal.ui.actions.ActionMessages;
 import org.eclipse.debug.ui.actions.RulerBreakpointAction;
 import org.eclipse.jface.text.source.IVerticalRulerInfo;
+import org.eclipse.swt.SWT;
 import org.eclipse.ui.texteditor.ITextEditor;
 import org.eclipse.ui.texteditor.IUpdate;
 
@@ -50,17 +51,18 @@
 	public void update() {
 		fBreakpoint = getBreakpoint();
 		setEnabled(fBreakpoint != null);
+		String accelerator = DebugUIPlugin.formatKeyBindingString(SWT.MOD2, ActionMessages.RulerEnableDisableBreakpointAction_4);
 		if (fBreakpoint != null) {
 			try {
 				if (fBreakpoint.isEnabled()) {
-					setText(ActionMessages.RulerEnableDisableBreakpointAction_2 + '\t' + ActionMessages.RulerEnableDisableBreakpointAction_4);
+					setText(ActionMessages.RulerEnableDisableBreakpointAction_2 + '\t' + accelerator);
 				} else {
-					setText(ActionMessages.RulerEnableDisableBreakpointAction_3 + '\t' + ActionMessages.RulerEnableDisableBreakpointAction_4);
+					setText(ActionMessages.RulerEnableDisableBreakpointAction_3 + '\t' + accelerator);
 				}
 			} catch (CoreException e) {
 			}
 		} else {
-			setText(ActionMessages.RulerEnableDisableBreakpointAction_2 + '\t' + ActionMessages.RulerEnableDisableBreakpointAction_4);
+			setText(ActionMessages.RulerEnableDisableBreakpointAction_2 + '\t' + accelerator);
 		}
 	}