Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Hungershausen2018-04-12 16:06:02 +0000
committerLars Vogel2018-05-03 07:30:30 +0000
commitbfd41b2fb50f1423059f8da255c25f6c4d60f3fd (patch)
tree3914290906b15aaf75a9e151137e3c2241a4f9b9
parentb238093ccf0721d2f39697f2648f82b14a454a69 (diff)
downloadeclipse.platform.debug-bfd41b2fb50f1423059f8da255c25f6c4d60f3fd.tar.gz
eclipse.platform.debug-bfd41b2fb50f1423059f8da255c25f6c4d60f3fd.tar.xz
eclipse.platform.debug-bfd41b2fb50f1423059f8da255c25f6c4d60f3fd.zip
Bug 532602 - Remove all Breakpoints dialog should use verbsI20180503-0740
Change-Id: I9bdd8349a4116ca034cf78a2d2cc2a65289ec000 Signed-off-by: Jonas Hungershausen <jonas.hungershausen@vogella.com>
-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