boolean (GrExpression replacedNewExpression) { final PsiElement parent = PsiUtil.skipParentheses(replacedNewExpression.getParent(), true); if (parent instanceof GrVariable && !(parent instanceof GrField) && !(parent instanceof GrParameter) && ((GrVariable)parent).getDeclaredType() != null && replacedNewExpression.getType() != null) { if (ApplicationManager.getApplication().isUnitTestMode() || Messages.showYesNoDialog(replacedNewExpression.getProject(), GroovyBundle.message( "do.you.want.to.change.variable.type", ((GrVariable)parent).getName()), GroovyIntentionsBundle.message( "convert.map.to.class.intention.name"), Messages.getQuestionIcon()) == Messages.YES) { return true; } } return false; }