@NotNull
  protected ElementsChooser<T> createChooser(@NotNull final FilteringGotoByModel<T> model,
                                             @NotNull final ChooseByNameFilterConfiguration<? super T> filterConfiguration) {
    List<T> elements = new ArrayList<>(getAllFilterValues());
    final ElementsChooser<T> chooser = new ElementsChooser<>(elements, true) {
      @Override
      protected String getItemText(@NotNull final T value) {
        return textForFilterValue(value);
      }

      @Override
      protected Icon getItemIcon(@NotNull final T value) {
        return iconForFilterValue(value);
      }
    };
    chooser.setFocusable(false);
    final int count = chooser.getElementCount();
    for (int i = 0; i < count; i++) {
      T type = chooser.getElementAt(i);
      if (!DumbService.getInstance(myProject).isDumb() && !filterConfiguration.isVisible(type)) {
        chooser.setElementMarked(type, false);
      }
    }
    updateModel(model, chooser, true);
    chooser.addElementsMarkListener((ElementsChooser.ElementsMarkListener<T>)(element, isMarked) -> {
      filterConfiguration.setVisible(element, isMarked);
      updateModel(model, chooser, false);
    });
    return chooser;
  }
@NotNull
  protected ElementsChooser<T> createChooser(@NotNull final FilteringGotoByModel<T> model,
                                             @NotNull final ChooseByNameFilterConfiguration<? super T> filterConfiguration)