HighlightingSessionImpl (@NotNull PsiFile psiFile, @Nullable Editor editor, @Nullable EditorColorsScheme editorColorsScheme, @NotNull DaemonProgressIndicator progressIndicator, @NotNull Number daemonCancelEventCount) { ThreadingAssertions.assertEventDispatchThread(); TextRange fileRange = psiFile.getTextRange(); ProperTextRange visibleRange; visibleRange = editor == null ? ProperTextRange.create(ObjectUtils.notNull(fileRange, TextRange.EMPTY_RANGE)) : editor.calculateVisibleRange(); CanISilentlyChange.Result canChangeFileSilently = CanISilentlyChange.thisFile(psiFile); return createHighlightingSession(psiFile, progressIndicator, editorColorsScheme, visibleRange, canChangeFileSilently, daemonCancelEventCount); }