@Override
  public @NotNull IntentionPreviewInfo generatePreview(@NotNull Project project, @NotNull PsiElement element) {
    if (!(element instanceof PsiExpression expression)) {
      return IntentionPreviewInfo.EMPTY;
    }
    final PsiType type = CommonJavaRefactoringUtil.getTypeByExpressionWithExpectedType(expression);
    if (type == null) {
      return IntentionPreviewInfo.EMPTY;
    }
    final PsiExpression[] occurrences = PsiExpression.EMPTY_ARRAY;
    final TypeSelectorManagerImpl typeSelectorManager = new TypeSelectorManagerImpl(project, type, expression, occurrences);
    final IntroduceVariableSettings settings =
      super.getSettings(project, null, expression, occurrences, typeSelectorManager, false, false, null, expression, JavaReplaceChoice.NO);
    new VariableExtractor(project, expression, null, expression, occurrences, settings).extractVariable();
    return IntentionPreviewInfo.DIFF;
  }
@Override
  public @NotNull IntentionPreviewInfo generatePreview(@NotNull Project project, @NotNull PsiElement element)