@Override public PsiDocCommentOwner getOwner() { final PsiElement parent = getParent(); if (parent instanceof PsiDocCommentOwner) { final PsiDocCommentOwner owner = (PsiDocCommentOwner) parent; if (owner.getDocComment() == this) { return owner; } } return null; }
public static boolean isDeprecatedByDocTag(@NotNull PsiDocCommentOwner owner) { PsiDocComment docComment = owner.getDocComment(); return docComment != null && docComment.findTagByName("deprecated") != null; }