TextEditorHighlightingPass (@NotNull PsiFile file, @NotNull Editor editor) { TextRange fileRange = FileStatusMap.getDirtyTextRange(editor.getDocument(), file, Pass.UPDATE_ALL); if (fileRange == null) return new ProgressableTextEditorHighlightingPass.EmptyPass(file.getProject(), editor.getDocument()); List<TextRange> adjustedRanges = computeReducedRanges(file, editor); TextRange restrictRange = computeRestrictRange(adjustedRanges, fileRange); boolean updateAll = isUpdatingWholeFile(fileRange, adjustedRanges); ProperTextRange visibleRange = HighlightingSessionImpl.getFromCurrentIndicator(file).getVisibleRange(); return new InjectedGeneralHighlightingPass(file, editor.getDocument(), // makes sense if more than one (adjustedRanges != null && adjustedRanges.size() == 1) ? null : adjustedRanges, restrictRange.getStartOffset(), restrictRange.getEndOffset(), updateAll, visibleRange, editor, new DefaultHighlightInfoProcessor()); }