void (@NotNull IdeModifiableModelsProvider modifiableModelsProvider, @NotNull Module module, @NotNull MavenRootModelAdapter rootModel, @NotNull MavenProjectsTree mavenModel, @NotNull MavenProject mavenProject, @NotNull MavenProjectChanges changes, @NotNull Map<MavenProject, String> mavenProjectToModuleName, @NotNull List<MavenProjectsProcessorTask> postTasks) { Element config = getConfig(mavenProject, "annotationProcessorPaths"); if (config == null) return; String annotationTargetDir = mavenProject.getAnnotationProcessorDirectory(false); // directory must exist before compilation start to be recognized as source root new File(rootModel.toPath(annotationTargetDir).getPath()).mkdirs(); rootModel.addGeneratedJavaSourceFolder(annotationTargetDir, JavaSourceRootType.SOURCE, false); Map<MavenProject, List<String>> map = ANNOTATION_PROCESSOR_MODULE_NAMES.get(modifiableModelsProvider, new HashMap<>()); collectProcessorModuleNames(List.of(mavenProject), mavenId -> { MavenProject mavenArtifact = mavenModel.findProject(mavenId); if (mavenArtifact == null) return null; String moduleName = mavenProjectToModuleName.get(mavenArtifact); if (moduleName == null) return null; return List.of(moduleName); }, map); ANNOTATION_PROCESSOR_MODULE_NAMES.set(modifiableModelsProvider, map); }