void (@NotNull PsiCallExpression callExpression) { super.visitCallExpression(callExpression); final JavaResolveResult resolveResult = callExpression.resolveMethodGenerics(); final PsiElement method = resolveResult.getElement(); if (method instanceof PsiMethod) { if (callExpression instanceof PsiMethodCallExpression && migrateEqualsMethod((PsiMethodCallExpression)callExpression, (PsiMethod)method)) { return; } PsiExpressionList argumentList = callExpression.getArgumentList(); if (argumentList == null) return; final PsiExpression[] psiExpressions = argumentList.getExpressions(); final PsiParameter[] originalParams = ((PsiMethod)method).getParameterList().getParameters(); final PsiSubstitutor evalSubstitutor = myTypeEvaluator.createMethodSubstitution(originalParams, psiExpressions, (PsiMethod)method, callExpression); for (int i = 0; i < psiExpressions.length; i++) { PsiParameter originalParameter; if (originalParams.length <= i) { if (originalParams.length > 0 && originalParams[originalParams.length - 1].isVarArgs()) { originalParameter = originalParams[originalParams.length - 1]; } else { continue; } } else { originalParameter = originalParams[i]; } processVariable(originalParameter, psiExpressions[i], null, resolveResult.getSubstitutor(), evalSubstitutor, true); } final PsiExpression qualifier = callExpression instanceof PsiMethodCallExpression ? ((PsiMethodCallExpression)callExpression).getMethodExpression().getQualifierExpression() : null; if (qualifier != null && qualifier.isPhysical() && !new TypeView(qualifier).isChanged()) { //substitute property otherwise final PsiType qualifierType = qualifier.getType(); if (qualifierType instanceof PsiClassType) { final PsiClassType.ClassResolveResult classResolveResult = ((PsiClassType)qualifierType).resolveGenerics(); final PsiElementFactory elementFactory = JavaPsiFacade.getElementFactory(myStatement.getProject()); PsiClass psiClass = classResolveResult.getElement(); if (psiClass == null) return; final PsiType migrationType = elementFactory.createType(psiClass, composeIfNotAssignable(classResolveResult.getSubstitutor(), evalSubstitutor)); myLabeler.migrateExpressionType(qualifier, migrationType, myStatement, migrationType.equals(qualifierType), true); } } } }