public static @NotNull IntentionAction wrap(@NotNull ProblemDescriptor descriptor, @NotNull LocalQuickFix fix) {
    if (fix instanceof IntentionAction intention) {
      return intention;
    }
    if (fix instanceof ModCommandQuickFix modCommandFix) {
      IntentionAction intention = new ModCommandQuickFixAction(descriptor, modCommandFix).asIntention();
      PsiFile file = descriptor.getPsiElement().getContainingFile();
      intention.isAvailable(file.getProject(), null, file); // cache presentation in wrapper
      return intention;
    }
    return new QuickFixWrapper(descriptor, fix);
  }
public static @NotNull IntentionAction wrap(@NotNull ProblemDescriptor descriptor, @NotNull LocalQuickFix fix)