boolean (PsiElement context) { if (context.getParent() instanceof GrReferenceExpression) { PsiElement parent = context.getParent().getParent(); while (parent instanceof GrStatement) { parent = parent.getParent(); } if ((parent instanceof GrControlFlowOwner || parent instanceof GrCaseSection) && isNewStatement(context, true)) { return true; } } return context.getParent() instanceof GrTypeDefinitionBody && isNewStatement(context, true); }