} else {
try {
// try performing the renaming operation.
HierarchyAlterer hierarchyAlterer = DashController
.getHierarchyAlterer();
hierarchyAlterer.renameNode(projectPath, newPath);
// 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) {