@ApiStatus.Internal
  public static @NotNull CachedIntentions calcCachedIntentions(@NotNull Project project,
                                                               @NotNull Editor editor,
                                                               @NotNull PsiFile file) {
    ThreadingAssertions.assertEventDispatchThread();
    if (ApplicationManager.getApplication().isWriteAccessAllowed()) {
      throw new IllegalStateException("must not wait for intentions inside write action");
    }
    String progressTitle = CodeInsightBundle.message("progress.title.searching.for.context.actions");
    DumbService dumbService = DumbService.getInstance(project);
    boolean useAlternativeResolve = dumbService.isAlternativeResolveEnabled();
    ThrowableComputable<CachedIntentions, RuntimeException> prioritizedRunnable =
      () -> ProgressManager.getInstance().computePrioritized(() -> {
        DaemonCodeAnalyzerImpl.waitForUnresolvedReferencesQuickFixesUnderCaret(file, editor);
        return ReadAction.compute(() -> CachedIntentions.createAndUpdateActions(
          project, file, editor,
          ShowIntentionsPass.getActionsToShow(editor, file)));
      });
    ThrowableComputable<CachedIntentions, RuntimeException> process =
      useAlternativeResolve
      ? () -> dumbService.computeWithAlternativeResolveEnabled(prioritizedRunnable)
      : prioritizedRunnable;
    return ProgressManager.getInstance().runProcessWithProgressSynchronously(process, progressTitle, true, project);
  }
@ApiStatus.Internal
  public static @NotNull CachedIntentions calcCachedIntentions(@NotNull Project project,
                                                               @NotNull Editor editor,
                                                               @NotNull PsiFile file)