private static Document getDocument(@NotNull PsiElement tagElement) {
    return tagElement.getContainingFile().getViewProvider().getDocument();
  }
private static Document getDocument(@NotNull PsiElement tagElement)