void (@NotNull PsiExpressionList list) { PsiResolveHelper helper = JavaPsiFacade.getInstance(list.getProject()).getResolveHelper(); PsiElement parent = list.getParent(); if (parent instanceof PsiMethodCallExpression methodCall) { CandidateInfo[] candidates = helper.getReferencedMethodCandidates(methodCall, false, true); Collections.addAll(myResult, getExpectedArgumentTypesForMethodCall(candidates, list, myExpr, myForCompletion)); } else if (parent instanceof PsiEnumConstant enumConstant) { getExpectedArgumentsTypesForEnumConstant(enumConstant, list); } else if (parent instanceof PsiNewExpression newExpression) { getExpectedArgumentsTypesForNewExpression(newExpression, list); } else if (parent instanceof PsiAnonymousClass) { getExpectedArgumentsTypesForNewExpression((PsiNewExpression)parent.getParent(), list); } else if (parent instanceof PsiSwitchLabelStatementBase switchLabel) { PsiSwitchBlock switchBlock = switchLabel.getEnclosingSwitchBlock(); handleCaseElementList(switchBlock); } }