boolean (@NotNull PsiElement element) { PsiElement parent = element; while ((parent = PsiTreeUtil.getParentOfType(parent, PsiModifierListOwner.class, true)) != null) { if (PsiImplUtil.isDeprecated(parent)) { return true; } } return false; }