ExcludesConfigurationState () { if (myDisabledAutodetectionInfo == null || myDisabledAutodetectionInfo.getElements().isEmpty()) { return null; } final ExcludesConfigurationState state = new ExcludesConfigurationState(); for (DisabledAutodetectionByTypeElement element : myDisabledAutodetectionInfo.getElements()) { final String frameworkId = element.getFacetTypeId(); final List<DisabledAutodetectionInModuleElement> moduleElements = element.getModuleElements(); if (moduleElements.isEmpty()) { state.getFrameworkTypes().add(frameworkId); continue; } Set<String> excludedUrls = new LinkedHashSet<>(); for (DisabledAutodetectionInModuleElement moduleElement : moduleElements) { if (moduleElement.isDisableInWholeModule()) { final Module module = ModuleManager.getInstance(myProject).findModuleByName(moduleElement.getModuleName()); if (module != null) { Collections.addAll(excludedUrls, ModuleRootManager.getInstance(module).getContentRootUrls()); } } else { excludedUrls.addAll(moduleElement.getFiles()); excludedUrls.addAll(moduleElement.getDirectories()); } } for (String url : excludedUrls) { state.getFiles().add(new ExcludedFileState(url, frameworkId)); } } return state; }