TextRange () { if(myElements.length == 0){ final ASTNode child = XmlChildRole.START_TAG_END_FINDER.findChild(myTag.getNode()); if(child != null) return new TextRange(child.getStartOffset() + 1, child.getStartOffset() + 1); return new TextRange(myTag.getTextRange().getEndOffset(), myTag.getTextRange().getEndOffset()); } return new TextRange(myElements[0].getTextRange().getStartOffset(), myElements[myElements.length - 1].getTextRange().getEndOffset()); }