Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.java1
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.properties5
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveAllBreakpointsAction.java43
3 files changed, 31 insertions, 18 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.java
index 622fcf206..0a364d8a9 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.java
@@ -96,6 +96,7 @@ public class ActionMessages extends NLS {
public static String RemoveAllBreakpointsAction_1;
public static String RemoveAllBreakpointsAction_2;
public static String RemoveAllBreakpointsAction_3;
+ public static String RemoveAllBreakpointsAction_4;
public static String RemoveBreakpointAction_0;
public static String RemoveBreakpointAction_1;
public static String RemoveBreakpointAction_2;
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 721f34a81..30e57f991 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
@@ -47,6 +47,7 @@ RemoveAllBreakpointsAction_0=Remove All Breakpoints
RemoveAllBreakpointsAction_1=Are you sure you want to remove all breakpoints?
RemoveAllBreakpointsAction_2=Remove Breakpoints
RemoveAllBreakpointsAction_3=&Do not ask me again.
+RemoveAllBreakpointsAction_4=&Remove
RemoveAllExpressionsAction_0=Remove All Expressions
RemoveAllExpressionsAction_1=Are you sure you want to remove all expressions?
@@ -55,8 +56,8 @@ RemoveBreakpointAction_1=Delete all breakpoints in the selected group(s)?
RemoveBreakpointAction_2=Remove Breakpoints
RemoveBreakpointAction_3=Remove Items
RemoveBreakpointAction_4=Which item(s) would you like to remove?
-RemoveBreakpointAction_5=OK
-RemoveBreakpointAction_6=Cancel
+RemoveBreakpointAction_5=&Remove
+RemoveBreakpointAction_6=&No
RemoveBreakpointAction_Exceptions_occurred_attempting_to_remove_a_breakpoint__5=An exception occurred attempting to remove breakpoint(s).
RemoveBreakpointAction_Removing_a_breakpoint_4=Removing a breakpoint
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveAllBreakpointsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveAllBreakpointsAction.java
index 3aab6c525..4e90a3ca8 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveAllBreakpointsAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveAllBreakpointsAction.java
@@ -11,24 +11,14 @@
package org.eclipse.debug.internal.ui.actions.breakpoints;
-import org.eclipse.swt.widgets.Shell;
+import java.util.LinkedHashMap;
+import org.eclipse.core.resources.IMarkerDelta;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
-
-import org.eclipse.core.resources.IMarkerDelta;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.IPreferenceStore;
-
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchWindow;
-
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.IBreakpointManager;
import org.eclipse.debug.core.IBreakpointsListener;
@@ -37,8 +27,15 @@ import org.eclipse.debug.internal.ui.DebugUIPlugin;
import org.eclipse.debug.internal.ui.actions.AbstractRemoveAllActionDelegate;
import org.eclipse.debug.internal.ui.actions.ActionMessages;
import org.eclipse.debug.internal.ui.preferences.IDebugPreferenceConstants;
-
import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.MessageDialogWithToggle;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbenchWindow;
/**
* Removes all breakpoints from the source (markers) and remove all
@@ -116,9 +113,23 @@ public class RemoveAllBreakpointsAction extends AbstractRemoveAllActionDelegate
boolean prompt = store.getBoolean(IDebugPreferenceConstants.PREF_PROMPT_REMOVE_ALL_BREAKPOINTS);
boolean proceed = true;
if(prompt) {
- MessageDialogWithToggle mdwt = MessageDialogWithToggle.openYesNoQuestion(window.getShell(), ActionMessages.RemoveAllBreakpointsAction_0,
- ActionMessages.RemoveAllBreakpointsAction_1, ActionMessages.RemoveAllBreakpointsAction_3, !prompt, null, null);
- if(mdwt.getReturnCode() != IDialogConstants.YES_ID){
+ LinkedHashMap<String, Integer> buttonLabelToId = new LinkedHashMap<>();
+ buttonLabelToId.put(ActionMessages.RemoveAllBreakpointsAction_4, IDialogConstants.YES_ID);
+ buttonLabelToId.put(IDialogConstants.NO_LABEL, IDialogConstants.NO_ID);
+ MessageDialogWithToggle mdwt =
+ new MessageDialogWithToggle(
+ window.getShell(),
+ ActionMessages.RemoveAllBreakpointsAction_0,
+ null,
+ ActionMessages.RemoveAllBreakpointsAction_1,
+ MessageDialog.QUESTION,
+ buttonLabelToId,
+ 0,
+ ActionMessages.RemoveAllBreakpointsAction_3,
+ !prompt
+ );
+ int x = mdwt.open();
+ if (mdwt.getReturnCode() != IDialogConstants.YES_ID) {
proceed = false;
}
else {

Back to the top