WorldObject selectedNode = SelectionHandler.getActiveObject();
UINetwork selectedNetwork = UINetwork.getClosestNetwork(selectedNode);
if (selectedNetwork != null) {
SaveNodeAction saveNodeAction = new SaveNodeAction(selectedNetwork);
saveNodeAction.doAction();
} else {
throw new ActionException("No parent network to save, please select a node");
}
}