Skip to content

Commit 2468722

Browse files
SougandhSjukzi
authored andcommitted
Disable all breakpoints bugfix + code changes
1 parent 6887f61 commit 2468722

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

debug/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/DisableAllBreakpointsAction.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,21 @@ public class DisableAllBreakpointsAction extends AbstractRemoveAllActionDelegate
3737

3838
@Override
3939
protected boolean isEnabled() {
40-
return DebugPlugin.getDefault().getBreakpointManager().getBreakpoints().length > 0;
40+
IBreakpointManager breakpointManager = DebugPlugin.getDefault().getBreakpointManager();
41+
IBreakpoint[] breakpoints = breakpointManager.getBreakpoints();
42+
for (IBreakpoint bp : breakpoints) {
43+
try {
44+
if (bp.isEnabled()) {
45+
return true;
46+
}
47+
} catch (CoreException e) {
48+
DebugUIPlugin.log(e);
49+
}
50+
}
51+
if (breakpoints.length >= 0) {
52+
return false;
53+
}
54+
return true;
4155
}
4256

4357
@Override

0 commit comments

Comments
 (0)