public static @NotNull <T> SimpleListCellRenderer<T> create(@NotNull @NlsContexts.Label String nullValue,
                                                                        @NotNull Function<? super T, @NlsContexts.Label String> getText) {
    return new SimpleListCellRenderer<>() {
      @Override
      public void customize(@NotNull JList<? extends T> list, T value, int index, boolean selected, boolean hasFocus) {
        setText(value == null ? nullValue : getText.fun(value));
      }
    };
  }
public static @NotNull <T> SimpleListCellRenderer<T> create(@NotNull @NlsContexts.Label String nullValue,
                                                                        @NotNull Function<? super T, @NlsContexts.Label String> getText)