public static @NotNull IntentionPreviewInfo generateXmlEntitiesInspectionDiffPreview(@NotNull Project project, @NotNull String key, @NotNull String name) {
    InspectionProfile profile = InspectionProjectProfileManager.getInstance(project).getCurrentProfile();
    final var tool = profile.getInspectionTool(key, project);
    if (tool != null && tool.getTool() instanceof XmlEntitiesInspection inspection) {
      final String list = inspection.getAdditionalEntries();
      return new IntentionPreviewInfo.CustomDiff(UnknownFileType.INSTANCE,
                                                 list,
                                                 list.isBlank() ? name : list + "," + name);
    }
    return IntentionPreviewInfo.EMPTY;
  }
public static @NotNull IntentionPreviewInfo generateXmlEntitiesInspectionDiffPreview(@NotNull Project project, @NotNull String key, @NotNull String name)