@Override
  protected @NotNull ModCommand perform(@NotNull ActionContext context, @NotNull PsiExpression expression) {
    List<PsiExpression> sideEffects =
      myExtractSideEffects == ThreeState.NO ? List.of() : SideEffectChecker.extractSideEffectExpressions(expression);
    CodeBlockSurrounder surrounder = CodeBlockSurrounder.forExpression(expression);
    if (surrounder == null) {
      sideEffects = List.of();
    }
    if (sideEffects.isEmpty()) {
      return ModCommand.psiUpdate(expression, expr -> applyFix(expr, PsiStatement.EMPTY_ARRAY));
    }
    if (myExtractSideEffects == ThreeState.UNSURE) {
      return ModCommand.chooseAction(JavaAnalysisBundle.message("replace.with.constant.value.title"),
                                     new ReplaceWithConstantValueFix(expression, myPresentableName, myReplacementText, true),
                                     new ReplaceWithConstantValueFix(expression, myPresentableName, myReplacementText, false));
    }
    PsiStatement[] statements = StatementExtractor.generateStatements(sideEffects, expression);
    return ModCommand.psiUpdate(expression, (expr, updater) -> applyFix(expr, statements));
  }
@Override
  protected @NotNull ModCommand perform(@NotNull ActionContext context, @NotNull PsiExpression expression)