IntentionAction (@NotNull ProblemDescriptor descriptor, int fixNumber) { LOG.assertTrue(fixNumber >= 0, fixNumber); QuickFix<?>[] fixes = descriptor.getFixes(); LOG.assertTrue(fixes != null && fixes.length > fixNumber); final QuickFix<?> fix = fixes[fixNumber]; if (fix instanceof IntentionAction intention) { return intention; } LocalQuickFix localFix = (LocalQuickFix) fix; 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, localFix); }