class PatchInstallerUtil {

  @Nullable
  static LocalPackage getDependantPatcher(@NotNull RemotePackage remote, @NotNull RepoManager mgr) {
    for (Dependency d : remote.getAllDependencies()) {
      if (d.getPath().startsWith(PATCHER_PATH_PREFIX + RepoPackage.PATH_SEPARATOR)) {
        LocalPackage patcher = mgr.getPackages().getLocalPackages().get(d.getPath());
        if (patcher != null) {
          return patcher;
        }
      }
    }
    return null;
  }

}