void (Element processing) { // collect data final boolean isEnabled = Boolean.parseBoolean(processing.getAttributeValue(JpsJavaCompilerConfigurationSerializer.ENABLED, "false")); final boolean isUseClasspath = Boolean.parseBoolean(processing.getAttributeValue("useClasspath", "true")); final StringBuilder processorPath = new StringBuilder(); final Set<String> optionPairs = new HashSet<>(); final Set<String> processors = new HashSet<>(); final List<Couple<String>> modulesToProcess = new ArrayList<>(); for (Element pathElement : processing.getChildren("processorPath")) { final String path = pathElement.getAttributeValue("value", (String)null); if (path != null) { if (processorPath.length() > 0) { processorPath.append(File.pathSeparator); } processorPath.append(path); } } for (Element processorElement : processing.getChildren("processor")) { final String proc = processorElement.getAttributeValue(JpsJavaCompilerConfigurationSerializer.NAME, (String)null); if (proc != null) { processors.add(proc); } final StringTokenizer tokenizer = new StringTokenizer(processorElement.getAttributeValue("options", ""), " ", false); while (tokenizer.hasMoreTokens()) { final String pair = tokenizer.nextToken(); optionPairs.add(pair); } } for (Element moduleElement : processing.getChildren("processModule")) { final String name = moduleElement.getAttributeValue(JpsJavaCompilerConfigurationSerializer.NAME, (String)null); if (name == null) { continue; } final String dir = moduleElement.getAttributeValue("generatedDirName", (String)null); modulesToProcess.add(Couple.of(name, dir)); } myDefaultProcessorsProfile.setEnabled(false); myDefaultProcessorsProfile.setObtainProcessorsFromClasspath(isUseClasspath); if (processorPath.length() > 0) { myDefaultProcessorsProfile.setProcessorPath(processorPath.toString()); } if (!optionPairs.isEmpty()) { for (String pair : optionPairs) { final int index = pair.indexOf("="); if (index > 0) { myDefaultProcessorsProfile.setOption(pair.substring(0, index), pair.substring(index + 1)); } } } for (String processor : processors) { myDefaultProcessorsProfile.addProcessor(processor); } final Map<String, Set<String>> dirNameToModulesMap = new HashMap<>(); for (Couple<String> moduleDirPair : modulesToProcess) { final String dir = moduleDirPair.getSecond(); Set<String> set = dirNameToModulesMap.get(dir); if (set == null) { set = new HashSet<>(); dirNameToModulesMap.put(dir, set); } set.add(moduleDirPair.getFirst()); } int profileIndex = 0; for (Map.Entry<String, Set<String>> entry : dirNameToModulesMap.entrySet()) { final String dirName = entry.getKey(); final ProcessorConfigProfile profile = new ProcessorConfigProfileImpl(myDefaultProcessorsProfile); profile.setName("Profile" + (++profileIndex)); profile.setEnabled(isEnabled); profile.setGeneratedSourcesDirectoryName(dirName, false); for (String moduleName : entry.getValue()) { profile.addModuleName(moduleName); } myModuleProcessorProfiles.add(profile); } }