@NotNull
  private static Collection<?> getVariants(CompletionParameters parameters) {
    if (!MavenDomUtil.isMavenFile(parameters.getOriginalFile())) return Collections.emptyList();

    SmartList<?> result = new SmartList<>();

    for (PsiReference each : getReferences(parameters)) {
      if (each instanceof TagNameReference) continue;

      if (each instanceof GenericDomValueReference reference) {

        Converter converter = reference.getConverter();

        if (converter instanceof MavenSmartConverter) {
          Collection variants = ((MavenSmartConverter)converter).getSmartVariants(reference.getConvertContext());
          if (converter instanceof ResolvingConverter) {
            addVariants((ResolvingConverter)converter, variants, result);
          }
          else {
            result.addAll(variants);
          }
        }
        else if (converter instanceof ResolvingConverter resolvingConverter) {
          Collection variants = resolvingConverter.getVariants(reference.getConvertContext());
          addVariants(resolvingConverter, variants, result);
        }
      }
      else {
        Collections.addAll((Collection)result, each.getVariants());
      }
    }
    return result;
  }
@NotNull
  private static Collection<?> getVariants(CompletionParameters parameters)