@Override
    public @NotNull IntentionPreviewInfo generatePreview(@NotNull Project project, @NotNull ProblemDescriptor previewDescriptor) {
      final PsiElement element = previewDescriptor.getPsiElement();
      if (element instanceof PsiLiteralExpression literal) {
        final PsiExpression[] duplicates = getDuplicateLiterals(project, literal, true);
        if (duplicates.length < 10) {
          return new IntentionPreviewInfo.Html(JavaI18nBundle.message(
            "inspection.duplicates.navigate.to.occurrences.preview",
            duplicates.length,
            literal.getText()
          ));
        }
        return new IntentionPreviewInfo.Html(JavaI18nBundle.message(
          "inspection.duplicates.navigate.to.many.occurrences.preview",
          duplicates.length,
          literal.getText()
        ));
      }
      return IntentionPreviewInfo.EMPTY;
    }
@Override
    public @NotNull IntentionPreviewInfo generatePreview(@NotNull Project project, @NotNull ProblemDescriptor previewDescriptor)