boolean (PsiElement place) { while (place != null) { if (place instanceof GrMethod || place instanceof GrClosableBlock || place instanceof GrClassInitializer) return true; if (place instanceof GrThrowStatement || place instanceof GrTypeDefinitionBody || place instanceof GroovyFile) return false; place = place.getParent(); } return false; }