Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPreferenceInitializer.java1
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.properties1
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveAllBreakpointsAction.java23
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencePage.java3
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencesMessages.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencesMessages.properties1
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/IDebugPreferenceConstants.java5
8 files changed, 33 insertions, 5 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPreferenceInitializer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPreferenceInitializer.java
index 81dc99dee..dc8358e27 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPreferenceInitializer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPreferenceInitializer.java
@@ -47,6 +47,7 @@ public class DebugUIPreferenceInitializer extends AbstractPreferenceInitializer
prefs.setDefault(IDebugUIConstants.PREF_SKIP_BREAKPOINTS_DURING_RUN_TO_LINE, false);
prefs.setDefault(IInternalDebugUIConstants.PREF_RELAUNCH_IN_DEBUG_MODE, MessageDialogWithToggle.NEVER);
prefs.setDefault(IInternalDebugUIConstants.PREF_CONTINUE_WITH_COMPILE_ERROR, MessageDialogWithToggle.PROMPT);
+ prefs.setDefault(IDebugPreferenceConstants.PREF_REMOVE_ALL_BREAKPOINTS, false);
//View Management preference page
prefs.setDefault(IDebugUIConstants.PREF_MANAGE_VIEW_PERSPECTIVES, IDebugUIConstants.ID_DEBUG_PERSPECTIVE);
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 f5c6e99f4..a8dd9c1bf 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
@@ -53,6 +53,8 @@ public class ActionMessages extends NLS {
public static String RemoveAllBreakpointsAction_1;
public static String RemoveAllBreakpointsAction_2;
+ public static String RemoveAllBreakpointsAction_3;
+
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 51550a102..b052d4981 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
@@ -48,6 +48,7 @@ RelaunchActionDelegate_Launch_Failed_1=Launch Failed
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.
RemoveAllExpressionsAction_0=Remove All Expressions
RemoveAllExpressionsAction_1=Are you sure you want to remove all expressions?
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 2c169dad0..fde9aa67b 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -24,8 +24,11 @@ import org.eclipse.debug.core.model.IBreakpoint;
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.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialogWithToggle;
+import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.ui.IWorkbenchWindow;
/**
@@ -83,7 +86,7 @@ public class RemoveAllBreakpointsAction extends AbstractRemoveAllActionDelegate
*/
public void run(IAction action) {
final IBreakpointManager breakpointManager= DebugPlugin.getDefault().getBreakpointManager();
- final IBreakpoint[] breakpoints= breakpointManager.getBreakpoints();
+ final IBreakpoint[] breakpoints = breakpointManager.getBreakpoints();
if (breakpoints.length < 1) {
return;
}
@@ -91,7 +94,19 @@ public class RemoveAllBreakpointsAction extends AbstractRemoveAllActionDelegate
if (window == null) {
return;
}
- boolean proceed = MessageDialog.openQuestion(window.getShell(), ActionMessages.RemoveAllBreakpointsAction_0, ActionMessages.RemoveAllBreakpointsAction_1);
+ IPreferenceStore store = DebugUIPlugin.getDefault().getPreferenceStore();
+ boolean delete = store.getBoolean(IDebugPreferenceConstants.PREF_REMOVE_ALL_BREAKPOINTS);
+ boolean proceed = true;
+ if(!delete) {
+ MessageDialogWithToggle mdwt = MessageDialogWithToggle.openYesNoQuestion(window.getShell(), ActionMessages.RemoveAllBreakpointsAction_0,
+ ActionMessages.RemoveAllBreakpointsAction_1, ActionMessages.RemoveAllBreakpointsAction_3, delete, null, null);
+ if(mdwt.getReturnCode() == IDialogConstants.NO_ID){
+ proceed = false;
+ }
+ else {
+ store.setValue(IDebugPreferenceConstants.PREF_REMOVE_ALL_BREAKPOINTS, mdwt.getToggleState());
+ }
+ }
if (proceed) {
new Job(ActionMessages.RemoveAllBreakpointsAction_2) {
protected IStatus run(IProgressMonitor monitor) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencePage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencePage.java
index 98b1b8df6..6c4a78587 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencePage.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencePage.java
@@ -60,7 +60,8 @@ public class DebugPreferencePage extends FieldEditorPreferencePage implements IW
createSpacer(getFieldEditorParent(), 2);
- addField(new BooleanFieldEditor(IDebugUIConstants.PREF_SKIP_BREAKPOINTS_DURING_RUN_TO_LINE, DebugPreferencesMessages.DebugPreferencePage_25, SWT.NONE, getFieldEditorParent()));
+ addField(new BooleanFieldEditor(IDebugUIConstants.PREF_SKIP_BREAKPOINTS_DURING_RUN_TO_LINE, DebugPreferencesMessages.DebugPreferencePage_25, SWT.NONE, getFieldEditorParent()));
+ addField(new BooleanFieldEditor(IDebugPreferenceConstants.PREF_REMOVE_ALL_BREAKPOINTS, DebugPreferencesMessages.DebugPreferencePage_29, SWT.NONE, getFieldEditorParent()));
createSpacer(getFieldEditorParent(), 2);
ColorFieldEditor mem= new ColorFieldEditor(IDebugUIConstants.PREF_CHANGED_DEBUG_ELEMENT_COLOR, DebugPreferencesMessages.DebugPreferencePage_4, getFieldEditorParent());
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencesMessages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencesMessages.java
index 01384b066..6bbe999b6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencesMessages.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencesMessages.java
@@ -32,6 +32,8 @@ public class DebugPreferencesMessages extends NLS {
public static String DebugPreferencePage_1;
public static String DebugPreferencePage_2;
+
+ public static String DebugPreferencePage_29;
public static String DebugPreferencePage_3;
public static String DebugPreferencePage_0;
public static String DebugPreferencePage_4;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencesMessages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencesMessages.properties
index f05ef5604..78cfe8c8d 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencesMessages.properties
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencesMessages.properties
@@ -39,6 +39,7 @@ DebugPreferencePage_25=Skip &breakpoints during a 'Run to Line' operation.
DebugPreferencePage_26=A&ctivate the debug view when a breakpoint is hit
DebugPreferencePage_27=Memor&y buffered color:
DebugPreferencePage_28=Changed value bac&kground color
+DebugPreferencePage_29=Do not prompt when deleting all breakpoints.
LaunchingPreferencePage_1=&Build (if required) before launching
LaunchingPreferencePage_2=Save required dirty editors before launching
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/IDebugPreferenceConstants.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/IDebugPreferenceConstants.java
index 17acbf0cb..3af8ad3b7 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/IDebugPreferenceConstants.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/IDebugPreferenceConstants.java
@@ -148,6 +148,11 @@ public interface IDebugPreferenceConstants {
*/
public static final int PREF_ROW_SIZE_DEFAULT = 16;
+ /**
+ * Stores the pref when remoing all breakpoints if the user wishes to be prompted
+ * @since 3.3
+ */
+ public static final String PREF_REMOVE_ALL_BREAKPOINTS = IDebugUIConstants.PLUGIN_ID + ".remove_all_breakpoints_prompt"; //$NON-NLS-1$
/**
* Default padded string for renderings

Back to the top