List<ChooseByNameContributor> (List<ChooseByNameContributor> contributors) { if (!DumbService.getInstance(myProject).isDumb()) return contributors; List<ChooseByNameContributor> answer = new ArrayList<>(contributors.size()); for (ChooseByNameContributor contributor : contributors) { if (DumbService.isDumbAware(contributor)) { answer.add(contributor); } } return answer; }