boolean (GrNewExpression newExpression) { final GrArgumentList argumentList = newExpression.getArgumentList(); if (argumentList == null) return false; if (argumentList.getNamedArguments().length == 0) return false; final GrCodeReferenceElement refElement = newExpression.getReferenceElement(); if (refElement == null) return false; final GroovyResolveResult resolveResult = newExpression.advancedResolve(); final PsiElement constructor = resolveResult.getElement(); if (constructor instanceof PsiMethod) { return ((PsiMethod)constructor).getParameterList().isEmpty(); } final PsiElement resolved = refElement.resolve(); return resolved instanceof PsiClass; }