@Override
  public int getTextEndOffset(@NotNull PsiElement element) {
    if (element instanceof XmlAttributeValue) {
      final XmlTag xmlTag = PsiTreeUtil.getParentOfType(element, XmlTag.class);// for convenience
      if (xmlTag != null) return xmlTag.getTextRange().getEndOffset();
      LOG.assertTrue(false);
    }
    return element.getTextRange().getEndOffset();
  }
@Override
  public int getTextEndOffset(@NotNull PsiElement element)