ThreeState (LookupElement[] allItems, PsiMethod method) { List<PsiMethod> overloads = JBIterable.of(allItems) .map(LookupElement::getPsiElement) .filter(PsiMethod.class) .filter(element -> element.getName().equals(method.getName())) .toList(); return overloads.isEmpty() ? ThreeState.fromBoolean(!method.getParameterList().isEmpty()) : hasParameters(overloads); }