void (SearchEverywhereContributor<?> contributor, boolean newVal) { int index = contributors().lastIndexOf(contributor); if (index < 0) { return; } boolean alreadyHas = isMoreElement(index); if (alreadyHas && !newVal) { listElements.remove(index); fireIntervalRemoved(this, index, index); } if (!alreadyHas && newVal) { index += 1; int elementsCount = index - contributors().indexOf(contributor); SearchEverywhereUsageTriggerCollector.MORE_ITEM_SHOWN.log( SearchEverywhereUsageTriggerCollector.ITEM_NUMBER_BEFORE_MORE.with(elementsCount), SearchEverywhereUsageTriggerCollector.IS_ONLY_MORE.with(false) ); listElements.add(index, new SearchEverywhereFoundElementInfo(MORE_ELEMENT, 0, contributor)); fireIntervalAdded(this, index, index); } }