boolean (ASTNode parent, ASTNode child) { if (parent != null && child != null) { PsiElement parentPsi = parent.getPsi(); if (parentPsi instanceof GrDocTag) { String name = ((GrDocTag) parentPsi).getName(); if (TAGS_WITH_REFERENCES.contains(name) && !(parentPsi instanceof GrDocInlinedTag) || INLINED_TAGS_WITH_REFERENCES.contains(name) && parentPsi instanceof GrDocInlinedTag) { return parent.findChildByType(GroovyDocTokenTypes.mGDOC_TAG_VALUE_TOKEN) == child; } } if (parentPsi instanceof GrDocMethodParameter && parent.findChildByType(GroovyDocTokenTypes.mGDOC_TAG_VALUE_TOKEN) == child) return true; if (parentPsi instanceof GrDocMemberReference) { ASTNode prev = child.getTreePrev(); if (prev != null && prev.getElementType() == GroovyDocTokenTypes.mGDOC_TAG_VALUE_SHARP_TOKEN) return false; return parent.findChildByType(GroovyDocTokenTypes.mGDOC_TAG_VALUE_TOKEN) == child; } } return false; }