void (@NotNull Module module, @NotNull VirtualFile root) { ModuleRootModificationUtil.updateModel(module, model -> { ContentEntry entry = findContentEntryWithAssertion(model, root); for (SourceFolder sourceFolder : entry.getSourceFolders()) { if (root.equals(sourceFolder.getFile())) { entry.removeSourceFolder(sourceFolder); break; } } }); }