private static <T> void addVariants(ResolvingConverter<T> converter, Collection<T> variants, Collection result) {
    for (T variant : variants) {
      LookupElement lookupElement = converter.createLookupElement(variant);
      if (lookupElement != null) {
        result.add(lookupElement);
      }
      else {
        result.add(variant);
      }
    }
  }
private static <T> void addVariants(ResolvingConverter<T> converter, Collection<T> variants, Collection result)