PsiJavaDocumentedElement (@NotNull PsiDocComment comment) { PsiElement parent = comment.getParent(); if (parent instanceof PsiJavaDocumentedElement) { PsiJavaDocumentedElement owner = (PsiJavaDocumentedElement)parent; if (owner.getDocComment() == comment) { return owner; } } return null; }