List<ReturnItem> (PsiDocComment comment) { List<ReturnItem> ranges = new ArrayList<>(); for (PsiElement child : comment.getChildren()) { if (child instanceof PsiDocTag && ((PsiDocTag)child).getName().equals("return")) { processLine(RETURN_LINE_START, child, Kind.LIKELY_VALUE, ranges); processLine(RETURN_LINE_MIDDLE, child, Kind.MAYBE_VALUE, ranges); processLine(RETURN_LINE_START_TYPE, child, Kind.MAYBE_TYPE, ranges); processLine(RETURN_LINE_START_TYPE_SINGULAR, child, Kind.MAYBE_TYPE_SINGULAR, ranges); } else if (child instanceof PsiDocToken && ((PsiDocToken)child).getTokenType() == JavaDocTokenType.DOC_COMMENT_DATA) { processLine(DESCRIPTION, child, Kind.LIKELY_VALUE, ranges); } } return ranges; }