1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 09:25:31 +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)
*/
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)
*/
public void toggleBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException {
ICElement element = getCElementFromSelection(part, selection);
if (element instanceof IFunction || element instanceof IMethod) {
toggleMethodBreakpoints0((IDeclaration)element);
} else if (element instanceof IVariable) {
toggleVariableWatchpoint(part, (IVariable) element);
} else {
toggleLineBreakpoints(part, selection);
}
if (canToggleLineBreakpoints(part, selection)) {
toggleLineBreakpoints(part, selection);
} else {
ICElement element = getCElementFromSelection(part, selection);
if (element instanceof IFunction || element instanceof IMethod) {
toggleMethodBreakpoints0((IDeclaration)element);
} else if (element instanceof IVariable) {
toggleVariableWatchpoint(part, (IVariable) element);
}
}
}
}