List<AnnotationDocGenerator> (@NotNull PsiAnnotationOwner owner, @NotNull PsiElement context) { if (owner instanceof PsiModifierList) { return getAnnotationsToShow(((PsiModifierListOwner)((PsiModifierList)owner).getParent())); } Set<String> shownAnnotations = new HashSet<>(); return ContainerUtil.mapNotNull(owner.getAnnotations(), annotation -> forAnnotation(context, shownAnnotations, annotation)); }