public static PsiElement @NotNull [] toPsiElementArray(@NotNull Collection<? extends PsiElement> collection) {
    return collection.isEmpty() ? PsiElement.EMPTY_ARRAY : collection.toArray(PsiElement.EMPTY_ARRAY);
  }
public static PsiElement @NotNull [] toPsiElementArray(@NotNull Collection<? extends PsiElement> collection)