void (Set<LookupElement> lookupElements, @Nullable SuggestedNameInfo callback, PrefixMatcher matcher, Project project, String... strings) { outer: for (int i = 0; i < strings.length; i++) { String name = strings[i]; if (!matcher.prefixMatches(name) || !PsiNameHelper.getInstance(project).isIdentifier(name, LanguageLevel.HIGHEST)) { continue; } for (LookupElement lookupElement : lookupElements) { if (lookupElement.getAllLookupStrings().contains(name)) { continue outer; } } LookupElement element = PrioritizedLookupElement.withPriority(LookupElementBuilder.create(name).withAutoCompletionPolicy(AutoCompletionPolicy.GIVE_CHANCE_TO_OVERWRITE), -i); if (callback != null) { element = withInsertHandler(callback, element); } lookupElements.add(element); } }