@Override
  protected @Nullable Presentation getPresentation(@NotNull ActionContext context, @NotNull PsiElement element) {
    final PsiIfStatement ifStatement = PsiTreeUtil.getParentOfType(element, PsiIfStatement.class);
    if (ifStatement == null) return null;

    final PsiExpression condition = PsiUtil.skipParenthesizedExprDown(ifStatement.getCondition());
    if (!(condition instanceof PsiPolyadicExpression polyadicExpression)) return null;

    final PsiType expressionType = polyadicExpression.getType();
    if (expressionType == null || !PsiTypes.booleanType().isAssignableFrom(expressionType)) return null;

    final IElementType operation = polyadicExpression.getOperationTokenType();
    if (operation != JavaTokenType.OROR && operation != JavaTokenType.ANDAND) return null;

    final PsiExpression operand = findOperand(element, polyadicExpression);
    if (operand == null) return null;
    return Presentation.of(JavaBundle.message("intention.extract.if.condition.text", PsiExpressionTrimRenderer.render(operand)));
  }
@Override
  protected @Nullable Presentation getPresentation(@NotNull ActionContext context, @NotNull PsiElement element)