void (@NotNull ProblemsHolder holder, PsiInlineDocTag tag) { if (IGNORE_SELF_REFS) { return; } PsiDocTagValue value = tag.getValueElement(); if (value == null) { return; } PsiReference reference = value.getReference(); if (reference == null) { return; } PsiElement target = reference.resolve(); if (target == null) { return; } if (PsiTreeUtil.getParentOfType(tag, PsiDocCommentOwner.class) != PsiTreeUtil.getParentOfType(target, PsiDocCommentOwner.class, false)) { return; } PsiElement nameElement = tag.getNameElement(); if (nameElement == null) { return; } holder.registerProblem(nameElement, JavaBundle.message("inspection.javadoc.problem.pointing.to.itself")); }