Skip to content

Commit

Permalink
Disable all breakpoints bugfix + code changes
Browse files Browse the repository at this point in the history
  • Loading branch information
SougandhS committed Oct 11, 2024
1 parent 6887f61 commit 16d8571
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,21 @@ public class DisableAllBreakpointsAction extends AbstractRemoveAllActionDelegate

@Override
protected boolean isEnabled() {
return DebugPlugin.getDefault().getBreakpointManager().getBreakpoints().length > 0;
IBreakpointManager breakpointManager = DebugPlugin.getDefault().getBreakpointManager();
IBreakpoint[] breakpoints = breakpointManager.getBreakpoints();
for (IBreakpoint bp : breakpoints) {
try {
if (bp.isEnabled()) {
return true;
}
} catch (CoreException e) {
DebugUIPlugin.log(e);
}
}
if (breakpoints.length >= 0) {
return false;
}
return true;
}

@Override
Expand Down

0 comments on commit 16d8571

Please sign in to comment.