void () { List<RawIncludedRuntimeModule> rawIncludedModules = PluginXmlReader.loadPluginModules(myMainModule, myRepository); List<IncludedRuntimeModule> includedModules = new ArrayList<>(); Set<RuntimeModuleId> optionalModuleIds = new LinkedHashSet<>(); ProductModeMatcher matcher = new ProductModeMatcher(myCurrentMode); for (RawIncludedRuntimeModule rawModule : rawIncludedModules) { IncludedRuntimeModule included = rawModule.resolve(myRepository); if (included != null && matcher.matches(included.getModuleDescriptor())) { includedModules.add(included); } if (!rawModule.getImportance().equals(ModuleImportance.FUNCTIONAL)) { optionalModuleIds.add(rawModule.getModuleId()); } } myOptionalModuleIds = optionalModuleIds; myIncludedModules = includedModules; }