String (List<? extends SearchEverywhereContributor<?>> contributors) { boolean commandsSupported = ContainerUtil.exists(contributors, contributor -> !contributor.getSupportedCommands().isEmpty()); if (commandsSupported) { return IdeBundle.message("searcheverywhere.textfield.hint", SearchTopHitProvider.getTopHitAccelerator()); } List<String> advertisements = ContainerUtil.mapNotNull(contributors, c -> c.getAdvertisement()); return advertisements.isEmpty() ? null : advertisements.get(new Random().nextInt(advertisements.size())); }