void (@NotNull Module module, @NotNull VirtualFile contentRoot, @NotNull Collection<String> urlsToUnExclude, @NotNull Collection<String> urlsToExclude) { updateModel(module, modifiableModel -> { for (ContentEntry contentEntry : modifiableModel.getContentEntries()) { if (contentRoot.equals(contentEntry.getFile())) { for (String url : urlsToUnExclude) { contentEntry.removeExcludeFolder(url); } for (String url : urlsToExclude) { contentEntry.addExcludeFolder(url); } break; } } }); }