// if this caused the old parent of the project to become
// childless, delete that parent (and grandparent, etc)
PropertyKey oldParent = projectNode.getParent();
while (ctx.getHierarchy().getNumChildren(oldParent) == 0) {
hierarchyAlterer.deleteNode(oldParent.path());
oldParent = oldParent.getParent();
}
// point the "active task" at the renamed project.
PropertyKey newNode = ctx.getHierarchy().findExistingKey(