public static Factory<List<Pair<String, Icon>>> createResolvingFunction(final GenericDomValue<?> reference) {
    return () -> {
      final Converter<?> converter = reference.getConverter();
      if (converter instanceof ResolvingConverter) {
        final AbstractConvertContext context = new AbstractConvertContext() {
          @Override
          public @NotNull DomElement getInvocationElement() {
            return reference;
          }
        };
        final ResolvingConverter<String> resolvingConverter = (ResolvingConverter<String>)converter;
        final Collection<? extends String> variants = resolvingConverter.getVariants(context);
        final List<Pair<String, Icon>> all =
          new ArrayList<>(ContainerUtil.map(variants, s -> Pair
            .create(ElementPresentationManager.getElementName(s), ElementPresentationManager.getIcon(s))));
        all.addAll(ContainerUtil.map(resolvingConverter.getAdditionalVariants(context), s -> new Pair<>(s, null)));
        return all;
      }
      return Collections.emptyList();
    };
  }
public static Factory<List<Pair<String, Icon>>> createResolvingFunction(final GenericDomValue<?> reference)