public static ResolveResult @NotNull [] createResults(@Nullable Collection<? extends PsiElement> elements) {
    if (elements == null || elements.isEmpty()) return EMPTY_ARRAY;

    final ResolveResult[] results = new ResolveResult[elements.size()];
    int i = 0;
    for (PsiElement element : elements) {
      results[i++] = new PsiElementResolveResult(element);
    }
    return results;
  }
public static ResolveResult @NotNull [] createResults(@Nullable Collection<? extends PsiElement> elements)