public static void chooseFiles(
    @NotNull FileChooserDescriptor descriptor,
    @Nullable Project project,
    @Nullable Component parent,
    @Nullable VirtualFile toSelect,
    @NotNull Consumer<? super List<VirtualFile>> callback
  ) {
    var parentComponent = parent == null ? WindowManager.getInstance().suggestParentWindow(project) : parent;
    FileChooserFactory.getInstance().createPathChooser(descriptor, project, parentComponent).choose(toSelect, callback);
  }
public static void chooseFiles(
    @NotNull FileChooserDescriptor descriptor,
    @Nullable Project project,
    @Nullable Component parent,
    @Nullable VirtualFile toSelect,
    @NotNull Consumer<? super List<VirtualFile>> callback
  )