1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-08 16:55:38 +02:00

[293634] Fix to make line breakpoints the default choice again.

This commit is contained in:
Marc Khouzam 2009-12-18 15:59:54 +00:00
parent 226a428dff
commit 959296fdd1

View file

@ -544,21 +544,25 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTargetExtensio
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension#canToggleBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection) * @see org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension#canToggleBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
*/ */
public boolean canToggleBreakpoints(IWorkbenchPart part, ISelection selection) { public boolean canToggleBreakpoints(IWorkbenchPart part, ISelection selection) {
return canToggleLineBreakpoints(part, selection); return canToggleLineBreakpoints(part, selection) ||
canToggleWatchpoints(part, selection) ||
canToggleMethodBreakpoints(part, selection);
} }
/* /*
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension#toggleBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection) * @see org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension#toggleBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
*/ */
public void toggleBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException { public void toggleBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException {
ICElement element = getCElementFromSelection(part, selection); if (canToggleLineBreakpoints(part, selection)) {
if (element instanceof IFunction || element instanceof IMethod) { toggleLineBreakpoints(part, selection);
toggleMethodBreakpoints0((IDeclaration)element); } else {
} else if (element instanceof IVariable) { ICElement element = getCElementFromSelection(part, selection);
toggleVariableWatchpoint(part, (IVariable) element); if (element instanceof IFunction || element instanceof IMethod) {
} else { toggleMethodBreakpoints0((IDeclaration)element);
toggleLineBreakpoints(part, selection); } else if (element instanceof IVariable) {
} toggleVariableWatchpoint(part, (IVariable) element);
}
}
} }
} }