int[] (PsiMethodCallExpression call, PsiParameterList parameterList) { final PsiExpressionList argumentList = call.getArgumentList(); final PsiExpression[] args = argumentList.getExpressions(); final int[] out = ArrayUtil.newIntArray(args.length); for (int i = 0; i < args.length; i++) { final PsiExpression arg = args[i]; final PsiParameter parameter = (PsiParameter)((PsiReference)arg).resolve(); out[i] = parameterList.getParameterIndex(parameter); } return out; }