@Deprecated
  void setVisitingTextRange(@NotNull PsiFile psiFile, @NotNull Document document, long range) {
    if (document instanceof DocumentWindow window) {
      range = TextRangeScalarUtil.toScalarRange(window.injectedToHost(TextRangeScalarUtil.create(range)));
      document = window.getDelegate();
      psiFile = InjectedLanguageManager.getInstance(psiFile.getProject()).getTopLevelFile(psiFile);
    }
    visitingRange = HighlightingSessionImpl.getOrCreateVisitingRangeMarker(psiFile, document, range);
  }
@Deprecated
  void setVisitingTextRange(@NotNull PsiFile psiFile, @NotNull Document document, long range)