public static PsiFile @NotNull [] toPsiFileArray(@NotNull Collection<? extends PsiFile> collection) {
    if (collection.isEmpty()) return PsiFile.EMPTY_ARRAY;
    return collection.toArray(PsiFile.EMPTY_ARRAY);
  }
public static PsiFile @NotNull [] toPsiFileArray(@NotNull Collection<? extends PsiFile> collection)