List<SETab> (List<? extends SearchEverywhereContributor<?>> contributors) { List<SETab> res = new ArrayList<>(); contributors = contributors.stream() .sorted(Comparator.comparingInt(SearchEverywhereContributor::getSortWeight)) .collect(Collectors.toList()); final Runnable onChanged = () -> { myToolbar.updateActionsImmediately(); myScopeChangedCallback.run(); }; if (contributors.size() > 1) { SETab allTab = createAllTab(contributors, onChanged); res.add(allTab); } TabsCustomizationStrategy.getInstance() .getSeparateTabContributors(contributors) .forEach(contributor -> { SETab tab = createTab(contributor, onChanged); res.add(tab); }); return res; }