boolean (GrReferenceExpression ref) { PsiElement element = null; final GroovyResolveResult[] resolveResults = ref.multiResolve(false); if (resolveResults.length == 0) return false; final GroovyResolveResult resolveResult = resolveResults[0]; if (resolveResult != null) { element = resolveResult.getElement(); } if (element instanceof PsiField) { return isRawType(((PsiField)element).getType(), resolveResult.getSubstitutor()); } else if (element instanceof GrAccessorMethod) { return isRawType(((GrAccessorMethod)element).getReturnType(), resolveResult.getSubstitutor()); } return false; }