ProcessorConfigProfile (Module module) { Map<Module, ProcessorConfigProfile> map = myProcessorsProfilesMap; if (map == null) { map = new HashMap<>(); final Map<String, Module> namesMap = new HashMap<>(); for (Module m : ModuleManager.getInstance(module.getProject()).getModules()) { namesMap.put(m.getName(), m); } if (!namesMap.isEmpty()) { for (ProcessorConfigProfile profile : myModuleProcessorProfiles) { for (String name : profile.getModuleNames()) { final Module mod = namesMap.get(name); if (mod != null) { map.put(mod, profile); } } } } myProcessorsProfilesMap = map; } final ProcessorConfigProfile profile = map.get(module); return profile != null? profile : myDefaultProcessorsProfile; }