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