boolean (PsiJavaDocumentedElement documentedElement, boolean checkContent) { final PsiDocComment comment = documentedElement.getDocComment(); if (comment == null) { return false; } final PsiDocTag deprecatedTag = comment.findTagByName("deprecated"); if (deprecatedTag == null) { return false; } if (!checkContent) { return true; } for (PsiElement element : deprecatedTag.getDataElements()) { if (element instanceof PsiDocTagValue || element instanceof PsiDocToken && ((PsiDocToken)element).getTokenType() == JavaDocTokenType.DOC_COMMENT_DATA) { return true; } } return false; }