public static void chooseFile(
    @NotNull FileChooserDescriptor descriptor,
    @Nullable Project project,
    @Nullable Component parent,
    @Nullable VirtualFile toSelect,
    @NotNull Consumer<? super VirtualFile> callback
  ) {
    LOG.assertTrue(!descriptor.isChooseMultiple());
    chooseFiles(descriptor, project, parent, toSelect, files -> callback.consume(files.get(0)));
  }
public static void chooseFile(
    @NotNull FileChooserDescriptor descriptor,
    @Nullable Project project,
    @Nullable Component parent,
    @Nullable VirtualFile toSelect,
    @NotNull Consumer<? super VirtualFile> callback
  )