Provide return types and named argument lists for methods provided by Gorm*Api.

This commit is contained in:
Sergey Evdokimov
2011-08-22 00:16:46 +04:00
parent 68a6163709
commit 3923e63f05
@@ -132,16 +132,13 @@ public class GrDescriptorReturnTypeCalculator extends GrCallExpressionTypeCalcul
return ourGuard.doPreventingRecursion(callExpression, true, new Computable<PsiType>() {
@Override
public PsiType compute() {
return finalClosure.getReturnType();
PsiType returnType = finalClosure.getReturnType();
if (returnType == PsiType.VOID) return null;
return returnType;
}
});
}
if (typeName.endsWith("[]")) {
PsiClassType type = TypesUtil.createType(typeName.substring(0, typeName.length() - 2), callExpression);
return type.createArrayType();
}
return TypesUtil.createType(typeName, callExpression);
return JavaPsiFacade.getElementFactory(containingClass.getProject()).createTypeFromText(typeName, callExpression);
}
}