TextRange () { final ASTNode sharp = findChildByType(DOC_TAG_VALUE_SHARP_TOKEN); if (sharp == null) return new TextRange(0, getTextLength()); final PsiElement nextSibling = SourceTreeToPsiMap.treeToPsiNotNull(sharp).getNextSibling(); if (nextSibling != null) { final int startOffset = nextSibling.getTextRange().getStartOffset() - getTextRange().getStartOffset(); int endOffset = nextSibling.getTextRange().getEndOffset() - getTextRange().getStartOffset(); return new TextRange(startOffset, endOffset); } return new TextRange(getTextLength(), getTextLength()); }