default @NotNull IntentionPreviewInfo generatePreview(@NotNull Project project, @NotNull ProblemDescriptor previewDescriptor) {
    if (!startInWriteAction()) return IntentionPreviewInfo.EMPTY;
    PsiElement element = previewDescriptor.getStartElement();
    if (element == null) return IntentionPreviewInfo.EMPTY;
    PsiFile file = element.getContainingFile();
    LocalQuickFix fix = ObjectUtils.tryCast(getFileModifierForPreview(file), LocalQuickFix.class);
    if (fix == null || fix.getElementToMakeWritable(file) != file) return IntentionPreviewInfo.EMPTY;
    fix.applyFix(project, previewDescriptor);
    return IntentionPreviewInfo.DIFF;
  }
default @NotNull IntentionPreviewInfo generatePreview(@NotNull Project project, @NotNull ProblemDescriptor previewDescriptor)