void (@NotNull Module module, @NotNull VirtualFile contentRoot) { ModuleRootModificationUtil.updateModel(module, model -> { ContentEntry entry = ContainerUtil.find(model.getContentEntries(), object -> contentRoot.equals(object.getFile())); model.removeContentEntry(assertEntryFound(model, contentRoot, entry)); }); }