@NotNull
  @Override
  public List<JavaBreakpointVariant> computeVariants(@NotNull Project project, @NotNull XSourcePosition position) {
    PsiFile file = DebuggerUtilsEx.getPsiFile(position, project);
    if (file == null) return Collections.emptyList();

    SourcePosition pos = SourcePosition.createFromLine(file, position.getLine());

    Document document = file.getViewProvider().getDocument();
    if (document == null) {
      return Collections.emptyList();
    }

    List<PsiLambdaExpression> lambdas = DebuggerUtilsEx.collectLambdas(pos, true);
    PsiElement condRet = canStopOnConditionalReturn(file)
                         ? findSingleConditionalReturn(project, document, position.getLine())
                         : null;

    // Start method is either outer method/lambda or lambda starting at the beginning of the line.
    PsiElement startMethod = DebuggerUtilsEx.getContainingMethod(pos);

    PsiElement outerMethod = startMethod != null && startMethod.getTextOffset() >= pos.getOffset()
                             ? DebuggerUtilsEx.getContainingMethod(startMethod.getParent())
                             : startMethod;

    // In this case, startMethod lambda is not treated like a real lambda variant, but it's just containing block for us.
    boolean startMethodIsOuterLambda = startMethod == outerMethod && lambdas.contains(startMethod);

    if ((lambdas.isEmpty() || (startMethodIsOuterLambda && lambdas.size() == 1)) && condRet == null) {
      return Collections.emptyList();
    }

    List<JavaBreakpointVariant> res = new SmartList<>();

    boolean mainMethodAdded = false;
    int lambdaCount = 0;
    if (!(startMethod instanceof PsiLambdaExpression)) {
      res.add(new LineJavaBreakpointVariant(position, startMethod, JavaLineBreakpointProperties.NO_LAMBDA));
      mainMethodAdded = true;
    }

    {
      int ordinal = 0;
      for (PsiLambdaExpression lambda : lambdas) { //lambdas
        PsiElement firstElem = DebuggerUtilsEx.getFirstElementOnTheLine(lambda, document, position.getLine());
        XSourcePositionImpl elementPosition = XSourcePositionImpl.createByElement(firstElem);
        if (elementPosition != null) {
          if (startMethodIsOuterLambda && lambda == startMethod) {
            res.add(0, new LineJavaBreakpointVariant(elementPosition, lambda, ordinal));
            mainMethodAdded = true;
          }
          else if (lambda != outerMethod) {
            lambdaCount++;
            res.add(new LambdaJavaBreakpointVariant(elementPosition, lambda, ordinal));
          }
          ordinal++;
        }
      }
    }

    if (lambdaCount >= 2 || (mainMethodAdded && lambdaCount == 1)) {
      res.add(new JavaBreakpointVariant(position, lambdaCount)); //all
    }

    if (condRet != null) {
      PsiElement method = DebuggerUtilsEx.getContainingMethod(condRet);
      int ordinal = lambdas.indexOf(method);
      res.add(new ConditionalReturnJavaBreakpointVariant(position, condRet, ordinal)); //conditional return
    }

    return res;
  }
@NotNull
  @Override
  public List<JavaBreakpointVariant> computeVariants(@NotNull Project project, @NotNull XSourcePosition position)