void (@NotNull PsiAnnotation annotation) { final PsiModifierListOwner modifierListOwner = PsiTreeUtil.getParentOfType(annotation, PsiModifierListOwner.class); if (modifierListOwner == null || // just added annotation modifierListOwner instanceof PsiClass || modifierListOwner instanceof PsiMethod) { incModificationCount(); } }