boolean (@NotNull PsiMethod method, PsiElement place) { if (method instanceof GrMethod && method.isConstructor()) { PsiClass aClass = method.getContainingClass(); if (aClass != null && !aClass.hasModifierProperty(PsiModifier.STATIC)) { PsiClass containingClass = aClass.getContainingClass(); if (containingClass != null && PsiUtil.findEnclosingInstanceClassInScope(containingClass, place, true) == null) { return true; } } } return false; }