public void processContributorNames(@Nonnull ChooseByNameContributor contributor, @Nonnull FindSymbolParameters parameters, @Nonnull Processor<? super String> nameProcessor) {
TIntHashSet filter = new TIntHashSet(1000);
if (contributor instanceof ChooseByNameContributorEx) {
((ChooseByNameContributorEx)contributor).processNames(s -> {
if (nameProcessor.process(s)) {
filter.add(s.hashCode());
}
return true;
}, parameters.getSearchScope(), parameters.getIdFilter());
}
else {
String[] names = contributor.getNames(myProject, parameters.isSearchInLibraries());
for (String element : names) {
if (nameProcessor.process(element)) {
filter.add(element.hashCode());
}
}
}
myContributorToItsSymbolsMap.put(contributor, filter);
}