TextRange (final XmlAttributeValue xmlAttributeValue) { ASTNode valueNode = XmlChildRole.ATTRIBUTE_VALUE_VALUE_FINDER.findChild(xmlAttributeValue.getNode()); PsiElement toHighlight = valueNode == null ? xmlAttributeValue : valueNode.getPsi(); TextRange childRange = toHighlight.getTextRange(); TextRange range = xmlAttributeValue.getTextRange(); return childRange.shiftRight(-range.getStartOffset()); }