ThreeState () { if (myArgumentList instanceof PsiExpressionList) { final PsiMethod method = getElement(); final PsiParameter[] parameters = method.getParameterList().getParameters(); final PsiExpression[] expressions = ((PsiExpressionList)myArgumentList).getExpressions(); if (!isVarargs() && myLanguageLevel.isAtLeast(LanguageLevel.JDK_1_8)) { if (expressions.length != parameters.length) { return ThreeState.NO; } } else { if (expressions.length < parameters.length - 1) { return ThreeState.NO; } if (parameters.length == 0 && expressions.length != parameters.length) { return ThreeState.NO; } } boolean unsure = false; for (int i = 0; i < expressions.length; i++) { final PsiExpression expression = expressions[i]; PsiType formalParameterType = i < parameters.length ? parameters[i].getType() : parameters[parameters.length - 1].getType(); if (formalParameterType instanceof PsiEllipsisType && isVarargs()) { formalParameterType = ((PsiEllipsisType)formalParameterType).getComponentType(); } ThreeState compatible = isPotentialCompatible(expression, getSiteSubstitutor().substitute(formalParameterType), method); if (compatible == ThreeState.NO) { return ThreeState.NO; } if (compatible == ThreeState.UNSURE) { unsure = true; } } if (unsure) return ThreeState.UNSURE; if (method.hasTypeParameters() && myTypeArguments != null) { return ThreeState.fromBoolean(method.getTypeParameters().length == myTypeArguments.length); //todo } } return ThreeState.YES; }