void (SearchEverywhereContributor<?> contributor, boolean contributorHasMore) { hasMoreContributors.put(contributor, contributorHasMore); int lasItemIndex = listElements.size() - 1; if (lasItemIndex < 0) { return; } boolean hasMore = ContainerUtil.exists(hasMoreContributors.values(), Conditions.is(true)); boolean alreadyHas = isMoreElement(lasItemIndex); if (alreadyHas && !hasMore) { listElements.remove(lasItemIndex); fireIntervalRemoved(this, lasItemIndex, lasItemIndex); } if (!alreadyHas && hasMore) { SearchEverywhereUsageTriggerCollector.MORE_ITEM_SHOWN.log( SearchEverywhereUsageTriggerCollector.ITEM_NUMBER_BEFORE_MORE.with(listElements.size()), SearchEverywhereUsageTriggerCollector.IS_ONLY_MORE.with(true) ); listElements.add(new SearchEverywhereFoundElementInfo(MORE_ELEMENT, 0, null)); lasItemIndex += 1; fireIntervalAdded(this, lasItemIndex, lasItemIndex); } }