@NotNull
  public static Collection<XSourcePosition> getAllPositionsForBreakpoints(@NotNull Project project, DataContext context) {
    Editor editor = XDebuggerUtilImpl.getEditor(project, context);
    if (editor == null) {
      return Collections.emptyList();
    }

    VirtualFile file = FileDocumentManager.getInstance().getFile(editor.getDocument());
    List<XSourcePosition> res = new SmartList<>();

    Integer line = XLineBreakpointManager.BREAKPOINT_LINE_KEY.getData(context);
    if (line != null) {
      XSourcePositionImpl position = XSourcePositionImpl.create(file, line);
      res.add(position);
      return res;
    }

    for (Caret caret : editor.getCaretModel().getAllCarets()) {
      XSourcePositionImpl position = XSourcePositionImpl.createByOffset(file, caret.getOffset());
      if (position != null) {
        res.add(position);
      }
    }
    return res;
  }
@NotNull
  public static Collection<XSourcePosition> getAllPositionsForBreakpoints(@NotNull Project project, DataContext context)