1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-02 05:45:58 +02:00

Bug 360588 - [breakpoints] Allow user to edit all its properties prior to creating the breakpoint

Allow event to be null.
Fix CBreakpointPropertyPage.okPressed().
This commit is contained in:
Pawel Piech 2012-02-22 22:21:11 -08:00
parent 7c1e0556b6
commit 7872ff527c
2 changed files with 4 additions and 9 deletions

View file

@ -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)

View file

@ -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);
}
}