@NotNull
    private static CommittingDocuments getCompletionPhase(@Nullable CompletionProgressIndicator prevIndicator,
                                                          Editor topLevelEditor,
                                                          @Nullable TypedEvent event) {
      if (event != null) {
        CompletionPhase currentPhase = CompletionServiceImpl.getCompletionPhase();
        if (currentPhase instanceof CommittingDocuments committingPhase &&
            !committingPhase.isExpired() &&
            event.equals(committingPhase.getEvent())) {
          committingPhase.incrementRequestCount();
          return committingPhase;
        }
      }
      CommittingDocuments phase = new CommittingDocuments(prevIndicator, topLevelEditor, event);
      CompletionServiceImpl.setCompletionPhase(phase);
      phase.ignoreCurrentDocumentChange();
      return phase;
    }
@NotNull
    private static CommittingDocuments getCompletionPhase(@Nullable CompletionProgressIndicator prevIndicator,
                                                          Editor topLevelEditor,
                                                          @Nullable TypedEvent event)