@Nonnull NodeStore store,
@Nonnull String workspaceName,
@Nonnull IndexEditorProvider indexEditor,
@Nonnull QueryIndexProvider indexProvider,
@Nonnull CommitHook commitHook) {
NodeStoreBranch branch = store.branch();
NodeState root = branch.getHead();
for (WorkspaceInitializer wspInit : initializer) {
root = wspInit.initialize(root, workspaceName, indexProvider, commitHook);
}
branch.setRoot(root);
try {
branch.merge(new EditorHook(new IndexUpdateProvider(indexEditor)));
} catch (CommitFailedException e) {
throw new RuntimeException(e);
}
}