Skip to main content
summaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorPawel Piech2012-02-23 01:21:11 -0500
committerPawel Piech2012-03-18 23:49:14 -0400
commit7872ff527c6dc66182da5af7e427ec808a586772 (patch)
treeaaac9ba602205edfa9bf13732ab9458feb9b7fc0 /debug
parent7c1e0556b62d6db469a472ba86df4dcc0505f6db (diff)
downloadorg.eclipse.cdt-7872ff527c6dc66182da5af7e427ec808a586772.tar.gz
org.eclipse.cdt-7872ff527c6dc66182da5af7e427ec808a586772.tar.xz
org.eclipse.cdt-7872ff527c6dc66182da5af7e427ec808a586772.zip
Bug 360588 - [breakpoints] Allow user to edit all its properties prior to creating the breakpoint
Allow event to be null. Fix CBreakpointPropertyPage.okPressed().
Diffstat (limited to 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPropertyPage.java9
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/AbstractToggleBreakpointAdapter.java4
2 files changed, 4 insertions, 9 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPropertyPage.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPropertyPage.java
index 65423c646f..aa1b7de7e1 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPropertyPage.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPropertyPage.java
@@ -368,12 +368,7 @@ public class CBreakpointPropertyPage extends FieldEditorPreferencePage implement
fIgnoreCount = new BreakpointIntegerFieldEditor( ICBreakpoint.IGNORE_COUNT, BreakpointsMessages.getString( "CBreakpointPropertyPage.17" ), parent ); //$NON-NLS-1$
fIgnoreCount.setValidRange( 0, Integer.MAX_VALUE );
fIgnoreCountTextControl = fIgnoreCount.getTextControl( parent );
- try {
- fIgnoreCountTextControl.setEnabled( getBreakpoint().getIgnoreCount() >= 0 );
- }
- catch( CoreException ce ) {
- CDebugUIPlugin.log( ce );
- }
+ fIgnoreCountTextControl.setEnabled( getPreferenceStore().getInt(ICBreakpoint.IGNORE_COUNT) >= 0 );
addField( fIgnoreCount );
}
@@ -421,7 +416,7 @@ public class CBreakpointPropertyPage extends FieldEditorPreferencePage implement
if (store instanceof CBreakpointPreferenceStore) {
((CBreakpointPreferenceStore)store).setCanceled(false);
}
- return super.performCancel();
+ return super.performOk();
}
/* (non-Javadoc)
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/AbstractToggleBreakpointAdapter.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/AbstractToggleBreakpointAdapter.java
index 71c403dc47..919609eeea 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/AbstractToggleBreakpointAdapter.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/AbstractToggleBreakpointAdapter.java
@@ -90,13 +90,13 @@ abstract public class AbstractToggleBreakpointAdapter
@Override
public void toggleBreakpointsWithEvent(IWorkbenchPart part, ISelection selection, Event event) throws CoreException {
- if((event.stateMask & SWT.MOD2) > 0) {
+ if(event != null && (event.stateMask & SWT.MOD2) > 0) {
if (toggleBreakpointEnable(part)) {
return;
}
}
else {
- boolean interactive = (event.stateMask & SWT.MOD1) > 0;
+ boolean interactive = event != null && (event.stateMask & SWT.MOD1) > 0;
updateBreakpoints(true, interactive, part, selection);
}
}

Back to the top