if (memento instanceof WorkspaceState) {
WorkspaceState state = (WorkspaceState) memento;
//Load the blocks state
for (Long blockID : state.blockStates.keySet()) {
Block toBeUpdated = getEnv().getBlock(blockID);
toBeUpdated.loadState(state.blockStates.get(blockID));
}
//Load the canvas state
blockCanvas.loadState(state.blockCanvasState);
}
}