@Override
 @NotNull
 public TextRange injectedToHost(
     @NotNull PsiElement injectedContext, @NotNull TextRange injectedTextRange) {
   ProperTextRange.assertProperRange(injectedTextRange);
   PsiFile file = injectedContext.getContainingFile();
   if (file == null) return injectedTextRange;
   Document document = PsiDocumentManager.getInstance(file.getProject()).getCachedDocument(file);
   if (!(document instanceof DocumentWindowImpl)) return injectedTextRange;
   DocumentWindowImpl documentWindow = (DocumentWindowImpl) document;
   return documentWindow.injectedToHost(injectedTextRange);
 }