mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-09 01:05:38 +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,20 +544,24 @@ 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 {
|
||||||
|
if (canToggleLineBreakpoints(part, selection)) {
|
||||||
|
toggleLineBreakpoints(part, selection);
|
||||||
|
} else {
|
||||||
ICElement element = getCElementFromSelection(part, selection);
|
ICElement element = getCElementFromSelection(part, selection);
|
||||||
if (element instanceof IFunction || element instanceof IMethod) {
|
if (element instanceof IFunction || element instanceof IMethod) {
|
||||||
toggleMethodBreakpoints0((IDeclaration)element);
|
toggleMethodBreakpoints0((IDeclaration)element);
|
||||||
} else if (element instanceof IVariable) {
|
} else if (element instanceof IVariable) {
|
||||||
toggleVariableWatchpoint(part, (IVariable) element);
|
toggleVariableWatchpoint(part, (IVariable) element);
|
||||||
} else {
|
}
|
||||||
toggleLineBreakpoints(part, selection);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue