@Override
  protected @Nullable Presentation getPresentation(@NotNull ActionContext context, @NotNull PsiLoopStatement loop) {
    PsiVariable iterationParameter = getVariable(loop);
    if (iterationParameter == null || !(loop.getParent() instanceof PsiCodeBlock)) return null;
    List<PsiExpression> expressions = extractExpressions(loop);
    PsiStatement body = loop.getBody();
    if (body == null) return null;
    if (expressions.isEmpty() || expressions.size() > MAX_BODY_SIZE_ESTIMATE ||
        (expressions.size() - 1) * body.getTextLength() > MAX_BODY_SIZE_ESTIMATE){
      return null;
    }
    PsiStatement[] statements = ControlFlowUtils.unwrapBlock(body);
    if (statements.length == 0) return null;
    if (VariableAccessUtils.variableIsAssigned(iterationParameter, body)) return null;
    for (PsiStatement statement : statements) {
      if (isLoopBreak(statement)) continue;
      boolean acceptable = PsiTreeUtil.processElements(statement, e -> {
        if (e instanceof PsiBreakStatement breakStatement && breakStatement.findExitedStatement() == loop) return false;
        if (e instanceof PsiContinueStatement continueStatement && continueStatement.findContinuedStatement() == loop) return false;
        return true;
      });
      if (!acceptable) return null;
    }
    return Presentation.of(getFamilyName());
  }
@Override
  protected @Nullable Presentation getPresentation(@NotNull ActionContext context, @NotNull PsiLoopStatement loop)