TextRange[] (final @NotNull XmlTag tag) { final XmlTagValue value = tag.getValue(); final XmlText[] texts = value.getTextElements(); if (texts.length == 0) { return new TextRange[] { value.getTextRange().shiftRight(-tag.getTextOffset()) }; } else { final TextRange[] ranges = new TextRange[texts.length]; for (int i = 0; i < texts.length; i++) { ranges[i] = getValueRange(texts[i]); } return ranges; } }