private static boolean useNewChooser(FileChooserDescriptor descriptor) {
    return Registry.is("ide.ui.new.file.chooser") && ContainerUtil.and(descriptor.getRoots(), VirtualFile::isInLocalFileSystem);
  }
private static boolean useNewChooser(FileChooserDescriptor descriptor)