void (SearchEverywhereContributor contributor) { SearchEverywhereUsageTriggerCollector.MORE_ITEM_SELECTED.log(myProject); myListModel.freezeElements(); if (contributor != null) { myListModel.setHasMore(contributor, false); } else { myListModel.clearMoreItems(); } Map<SearchEverywhereContributor<?>, Collection<SearchEverywhereFoundElementInfo>> found = myListModel.getFoundElementsMap(); int additionalItemsCount = myHeader.getSelectedTab().isSingleContributor() ? SINGLE_CONTRIBUTOR_ELEMENTS_LIMIT : MULTIPLE_CONTRIBUTORS_ELEMENTS_LIMIT; Stream<Map.Entry<SearchEverywhereContributor<?>, Collection<SearchEverywhereFoundElementInfo>>> stream = found.entrySet().stream(); if (contributor != null) { stream = stream.filter(entry -> entry.getKey() == contributor); } else { stream = stream.filter(entry -> myListModel.hasMoreElements(entry.getKey())); } Map<? extends SearchEverywhereContributor<?>, Integer> contributorsAndLimits = stream.collect(Collectors.toMap(entry -> entry.getKey(), entry -> entry.getValue().size() + additionalItemsCount)); myHintHelper.setSearchInProgress(StringUtil.isNotEmpty(getSearchPattern())); mySearchProgressIndicator = mySearcher.findMoreItems(found, contributorsAndLimits, getSearchPattern()); }