void (@NotNull MavenWorkspaceConfigurator.AppliedModelContext context) { Map<String, Module> nameToModuleCache = new HashMap<>(); for (MavenProjectWithModules<Module> each : SequencesKt.asIterable(context.getMavenProjectsWithModules())) { for (ModuleWithType<Module> moduleWithType : each.getModules()) { Module module = moduleWithType.getModule(); nameToModuleCache.put(module.getName(), module); } } Function<@NotNull String, @Nullable Module> moduleByName = moduleName -> nameToModuleCache.get(moduleName); Map<MavenProject, List<String>> perProjectProcessorModuleNames = ANNOTATION_PROCESSOR_MODULE_NAMES.get(context, Map.of()); var changedOnly = SequencesKt.filter(context.getMavenProjectsWithModules(), it -> it.getChanges().hasChanges()); var projectWithModules = SequencesKt.map(changedOnly, it -> { List<String> processorModuleNames = perProjectProcessorModuleNames.getOrDefault(it.getMavenProject(), List.of()); return new MavenProjectWithProcessorModules(it.getMavenProject(), it.getModules(), processorModuleNames); }); configureProfiles(context.getProject(), context.getMavenProjectsTree(), SequencesKt.asIterable(projectWithModules), moduleByName); }