static @NotNull List<String> getChildPathsFromJar(@NotNull URL root) throws IOException {
    // Parse e.g. the following url: jar:file:/C:/build/idea-sandbox/plugins/lib/jar-2022.1.9999%20-%20Copy.jar!/file Templates/
    if (!URLUtil.JAR_PROTOCOL.equalsIgnoreCase(root.getProtocol())) {
      throw new RuntimeException("This function accepts only jar urls: " + root);
    }

    String rootPath = root.getPath();
    int jarSeparatorIndex = rootPath.indexOf(URLUtil.JAR_SEPARATOR);
    if (jarSeparatorIndex <= 0) {
      throw new RuntimeException("This function accepts only urls with '" + URLUtil.JAR_SEPARATOR + "': " + root);
    }

    String rootDirName = rootPath.substring(jarSeparatorIndex + 2);
    if (!rootDirName.endsWith(URL_PATH_SEPARATOR)) {
      rootDirName += URL_PATH_SEPARATOR;
    }

    String fileUrl = rootPath.substring(0, jarSeparatorIndex);
    if (!fileUrl.startsWith("file:")) {
      throw new RuntimeException("This function accepts 'jar:file:' urls: " + root);
    }

    File file = URLUtil.urlToFile(new URL(fileUrl));

    List<String> paths = new ArrayList<>();
    try (HashMapZipFile zipFile = HashMapZipFile.load(file.toPath())) {
      for (ImmutableZipEntry entry : zipFile.getEntries()) {
        String path = entry.getName();
        if (path.startsWith(rootDirName)) {
          paths.add(path.substring(rootDirName.length()));
        }
      }
      return paths;
    }
    catch (IOException | RuntimeException e) {
      throw e;
    }
    catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
static @NotNull List<String> getChildPathsFromJar(@NotNull URL root)