use of com.intellij.xdebugger.breakpoints.XLineBreakpointType in project intellij-community by JetBrains.
the class XToggleLineBreakpointActionHandler method isEnabled.
@Override
public boolean isEnabled(@NotNull final Project project, final AnActionEvent event) {
XLineBreakpointType<?>[] breakpointTypes = XDebuggerUtil.getInstance().getLineBreakpointTypes();
final XBreakpointManager breakpointManager = XDebuggerManager.getInstance(project).getBreakpointManager();
for (XSourcePosition position : XDebuggerUtilImpl.getAllCaretsPositions(project, event.getDataContext())) {
for (XLineBreakpointType<?> breakpointType : breakpointTypes) {
final VirtualFile file = position.getFile();
final int line = position.getLine();
if (breakpointType.canPutAt(file, line, project) || breakpointManager.findBreakpointAtLine(breakpointType, file, line) != null) {
return true;
}
}
}
return false;
}
Aggregations