List<LookupElement> (GroovyResolveResult[] candidates, boolean afterNew, PrefixMatcher matcher, PsiElement position) { List<LookupElement> result = new ArrayList<>(); for (GroovyResolveResult candidate : candidates) { result.addAll(createLookupElements(candidate, afterNew, matcher, position)); ProgressManager.checkCanceled(); } return result; }