boolean (@Nullable PsiElement place) { while (place != null) { if (place instanceof PsiAnnotation) return true; if (place instanceof GrClosableBlock || place instanceof GrTypeDefinition || place instanceof PsiFile) { return false; } place = place.getParent(); } return false; }