@ApiStatus.Internal
  public static void runInsideHighlightingSession(@NotNull PsiFile file,
                                                  @Nullable EditorColorsScheme editorColorsScheme,
                                                  @NotNull ProperTextRange visibleRange,
                                                  boolean canChangeFileSilently,
                                                  @NotNull Consumer<? super @NotNull HighlightingSession> runnable) {
    ApplicationManager.getApplication().assertIsNonDispatchThread();
    DaemonProgressIndicator indicator = GlobalInspectionContextBase.assertUnderDaemonProgress();
    HighlightingSessionImpl session = createHighlightingSession(file, indicator, editorColorsScheme, visibleRange, canChangeFileSilently
                                                                                                                 ? CanISilentlyChange.Result.UH_HUH
                                                                                                                 : CanISilentlyChange.Result.UH_UH,
                                                                0);
    try {
      session.additionalSetupFromBackground(file);
      runnable.accept(session);
    }
    finally {
      clearHighlightingSession(indicator, file);
    }
  }
@ApiStatus.Internal
  public static void runInsideHighlightingSession(@NotNull PsiFile file,
                                                  @Nullable EditorColorsScheme editorColorsScheme,
                                                  @NotNull ProperTextRange visibleRange,
                                                  boolean canChangeFileSilently,
                                                  @NotNull Consumer<? super @NotNull HighlightingSession> runnable)