@Override
    public @NotNull IntentionPreviewInfo generatePreview(@NotNull Project project, @NotNull ProblemDescriptor previewDescriptor) {
      final PsiElement element = previewDescriptor.getPsiElement();
      final PsiMethodCallExpression methodCallExpression = PsiTreeUtil.getParentOfType(element, PsiMethodCallExpression.class);
      if (methodCallExpression == null) return IntentionPreviewInfo.EMPTY;
      PsiMethod method = methodCallExpression.resolveMethod();
      if (method == null) return IntentionPreviewInfo.EMPTY;
      String methodText = PsiFormatUtil.formatMethod(method, PsiSubstitutor.EMPTY,
                                                  PsiFormatUtilBase.SHOW_CONTAINING_CLASS | PsiFormatUtilBase.SHOW_NAME, 0);
      return new IntentionPreviewInfo.Html(InspectionGadgetsBundle.message("auto.closeable.resource.quickfix.preview", methodText));
    }
@Override
    public @NotNull IntentionPreviewInfo generatePreview(@NotNull Project project, @NotNull ProblemDescriptor previewDescriptor)