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:
parent
226a428dff
commit
959296fdd1
1 changed files with 13 additions and 9 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue