private void scheduleContributorsAfterAsyncCommit(CompletionInitializationContextImpl initContext,
                                                    CompletionProgressIndicator indicator,
                                                    boolean hasModifiers) {
    CompletionPhase phase;
    if (synchronous) {
      phase = new CompletionPhase.BgCalculation(indicator);
      indicator.showLookup();
    }
    else {
      phase = new CompletionPhase.CommittingDocuments(indicator, InjectedLanguageEditorUtil.getTopLevelEditor(indicator.getEditor()), null);
    }
    CompletionServiceImpl.setCompletionPhase(phase);

    ReadAction
      .nonBlocking(() -> CompletionInitializationUtil.insertDummyIdentifier(initContext, indicator))
      .expireWith(phase)
      .withDocumentsCommitted(indicator.getProject())
      .finishOnUiThread(ModalityState.defaultModalityState(), applyPsiChanges -> {
        OffsetsInFile hostCopyOffsets = applyPsiChanges.get();

        if (phase instanceof CompletionPhase.CommittingDocuments) {
          ((CompletionPhase.CommittingDocuments)phase).replaced = true;
        }
        CompletionServiceImpl.setCompletionPhase(new CompletionPhase.BgCalculation(indicator));
        startContributorThread(initContext, indicator, hostCopyOffsets, hasModifiers);
      })
      .submit(AppExecutorUtil.getAppExecutorService());
  }
private void scheduleContributorsAfterAsyncCommit(CompletionInitializationContextImpl initContext,
                                                    CompletionProgressIndicator indicator,
                                                    boolean hasModifiers)