void (Project project, MavenProjectsTree tree, Iterable<MavenProjectWithProcessorModules> projectsWithModules, Function<@NotNull String, @Nullable Module> moduleByName) { CompilerConfigurationImpl compilerConfiguration = (CompilerConfigurationImpl)CompilerConfiguration.getInstance(project); for (var it : projectsWithModules) { MavenProject rootProject = ObjectUtils.notNull(tree.findRootProject(it.mavenProject), it.mavenProject); for (var moduleWithType : it.mavenProjectModules) { Module module = moduleWithType.getModule(); MavenModuleType moduleType = moduleWithType.getType(); if (!isLevelMoreThan6(module)) continue; if (shouldEnableAnnotationProcessors(it.mavenProject) && moduleType.getContainsCode()) { var processorModules = ContainerUtil.mapNotNull(it.processorModuleNames, eachName -> moduleByName.apply(eachName)); var profileIsDefault = createOrUpdateProfile(it.mavenProject, module, processorModules, compilerConfiguration); if (profileIsDefault != null) { cleanAndMergeModuleProfiles(rootProject, compilerConfiguration, profileIsDefault.first, profileIsDefault.second, module); } } else { cleanAndMergeModuleProfiles(rootProject, compilerConfiguration, null, false, module); } } } }