@Override
  public @NotNull IntentionPreviewInfo getPreview(@NotNull ModCommand modCommand, @NotNull ActionContext context) {
    Project project = context.project();
    PsiFile file = context.file();
    List<IntentionPreviewInfo.CustomDiff> customDiffList = new ArrayList<>();
    IntentionPreviewInfo navigateInfo = IntentionPreviewInfo.EMPTY;
    for (ModCommand command : modCommand.unpack()) {
      if (command instanceof ModUpdateFileText modFile) {
        VirtualFile vFile = modFile.file();
        var currentFile =
          vFile.equals(file.getOriginalFile().getVirtualFile()) ||
          vFile.equals(InjectedLanguageManager.getInstance(project).getTopLevelFile(file).getOriginalFile().getVirtualFile());
        customDiffList.add(new IntentionPreviewInfo.CustomDiff(vFile.getFileType(),
                                                               currentFile ? null : getFileNamePresentation(project, vFile),
                                                               modFile.oldText(),
                                                               modFile.newText(),
                                                               true));
      }
      else if (command instanceof ModCreateFile createFile) {
        VirtualFile vFile = createFile.file();
        String content =
          createFile.content() instanceof ModCreateFile.Text text ? text.text() : AnalysisBundle.message("preview.binary.content");
        customDiffList.add(new IntentionPreviewInfo.CustomDiff(vFile.getFileType(),
                                                               getFileNamePresentation(project, vFile),
                                                               "",
                                                               content,
                                                               true));
      }
      else if (command instanceof ModNavigate navigate && navigate.caret() != -1) {
        VirtualFile virtualFile = navigate.file();
        if (virtualFile.isValid()) {
          PsiFile target = PsiManager.getInstance(project).findFile(virtualFile);
          if (target != null) {
            navigateInfo = IntentionPreviewInfo.navigate(target, navigate.caret());
          }
        }
      }
      else if (command instanceof ModChooseAction target) {
        return getChoosePreview(context, target);
      }
      else if (command instanceof ModChooseMember target) {
        return getPreview(target.nextCommand().apply(target.defaultSelection()), context);
      }
      else if (command instanceof ModDisplayMessage message) {
        if (message.kind() == ModDisplayMessage.MessageKind.ERROR) {
          return new IntentionPreviewInfo.Html(new HtmlBuilder().append(
            AnalysisBundle.message("preview.cannot.perform.action")).br().append(message.messageText()).toFragment(),
                                               IntentionPreviewInfo.InfoKind.ERROR);
        }
        else if (navigateInfo == IntentionPreviewInfo.EMPTY) {
          navigateInfo = new IntentionPreviewInfo.Html(message.messageText());
        }
      }
      else if (command instanceof ModCopyToClipboard copy) {
        navigateInfo = new IntentionPreviewInfo.Html(text(
          AnalysisBundle.message("preview.copy.to.clipboard", StringUtil.shortenTextWithEllipsis(copy.content(), 50, 10))));
      }
      else if (command instanceof ModOpenUrl openUrl) {
        navigateInfo = new IntentionPreviewInfo.Html(text(
          AnalysisBundle.message("preview.open.url", StringUtil.shortenTextWithEllipsis(openUrl.url(), 50, 10))));
      }
      else if (command instanceof ModUpdateSystemOptions options) {
        HtmlChunk preview = createOptionsPreview(context, options);
        navigateInfo = preview.isEmpty() ? IntentionPreviewInfo.EMPTY : new IntentionPreviewInfo.Html(preview);
      }
    }
    return customDiffList.isEmpty() ? navigateInfo :
           customDiffList.size() == 1 ? customDiffList.get(0) :
           new IntentionPreviewInfo.MultiFileDiff(customDiffList);
  }
@Override
  public @NotNull IntentionPreviewInfo getPreview(@NotNull ModCommand modCommand, @NotNull ActionContext context)