private static @NotNull ProductModulesImpl loadProductModules(@NotNull RawProductModules rawProductModules,
                                                                @NotNull String debugName,
                                                                @NotNull ProductMode currentMode,
                                                                @NotNull RuntimeModuleRepository repository,
                                                                @NotNull ResourceFileResolver resourceFileResolver) {

    MainRuntimeModuleGroup mainGroup = new MainRuntimeModuleGroup(rawProductModules.getMainGroupModules(), currentMode, repository);
    List<PluginModuleGroup> bundledPluginModuleGroups = new ArrayList<>();
    for (RuntimeModuleId pluginMainModule : rawProductModules.getBundledPluginMainModules()) {
      RuntimeModuleDescriptor module = repository.resolveModule(pluginMainModule).getResolvedModule();
      /* todo: this check is temporarily added for JetBrains Client; 
         It includes intellij.performanceTesting.async plugin which dependencies aren't available in all IDEs, so we need to skip it.
         Plugins should define which modules from them should be included into JetBrains Client instead. */
      if (module != null) {
        bundledPluginModuleGroups.add(new PluginModuleGroupImpl(module, currentMode, repository, resourceFileResolver));
      }
    }
    return new ProductModulesImpl(debugName, mainGroup, bundledPluginModuleGroups);
  }
private static @NotNull ProductModulesImpl loadProductModules(@NotNull RawProductModules rawProductModules,
                                                                @NotNull String debugName,
                                                                @NotNull ProductMode currentMode,
                                                                @NotNull RuntimeModuleRepository repository,
                                                                @NotNull ResourceFileResolver resourceFileResolver)