private boolean processContributorForName(@NotNull ChooseByNameContributor contributor,
                                            @NotNull String name,
                                            @NotNull FindSymbolParameters parameters,
                                            @NotNull ProgressIndicator canceled,
                                            @NotNull List<? super NavigationItem> items) {
    if (myProject.isDisposed()) {
      return true;
    }
    try {
      boolean searchInLibraries = parameters.isSearchInLibraries();
      long start = System.nanoTime();
      int[] count = {0};

      if (contributor instanceof ChooseByNameContributorEx) {
        ((ChooseByNameContributorEx)contributor).processElementsWithName(name, item -> {
          canceled.checkCanceled();
          count[0]++;
          if (acceptItem(item)) items.add(item);
          return true;
        }, parameters);

        if (LOG.isDebugEnabled()) {
          LOG.debug(TimeoutUtil.getDurationMillis(start) + "," + contributor + "," + count[0]);
        }
      }
      else {
        NavigationItem[] itemsByName = contributor.getItemsByName(name, parameters.getLocalPatternName(), myProject, searchInLibraries);
        count[0] += itemsByName.length;
        for (NavigationItem item : itemsByName) {
          canceled.checkCanceled();
          if (item == null) {
            PluginException.logPluginError(LOG, "null item from contributor " + contributor + " for name " + name, null, contributor.getClass());
            continue;
          }
          VirtualFile file = item instanceof PsiElement && !(item instanceof PomTargetPsiElement)
                             ? PsiUtilCore.getVirtualFile((PsiElement)item) : null;
          if (file != null && !parameters.getSearchScope().contains(file)) continue;

          if (acceptItem(item)) {
            items.add(item);
          }
        }
      }
      if (LOG.isDebugEnabled()) {
        LOG.debug(TimeoutUtil.getDurationMillis(start) + "," + contributor + "," + count[0]);
      }
    }
    catch (ProcessCanceledException ex) {
      // index corruption detected, ignore
    }
    catch (Throwable ex) {
      LOG.error(ex);
    }
    return true;
  }
private boolean processContributorForName(@NotNull ChooseByNameContributor contributor,
                                            @NotNull String name,
                                            @NotNull FindSymbolParameters parameters,
                                            @NotNull ProgressIndicator canceled,
                                            @NotNull List<? super NavigationItem> items)