PsiType (@NotNull PsiVariable var, @NotNull PsiElement place) { if (!(var instanceof GrVariable) || !(place.getLanguage() == GroovyLanguage.INSTANCE)) return null; if (var instanceof GrField) return var.getType(); return TypeInferenceHelper.getVariableTypeInContext(place, (GrVariable)var); }