Skip to content
This repository has been archived by the owner on Jan 11, 2020. It is now read-only.

Commit

Permalink
Debug tree command now returns Uuid of containers
Browse files Browse the repository at this point in the history
  • Loading branch information
Timidger committed Jan 2, 2017
1 parent 92f1656 commit 76b4369
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/layout/mod.rs
Expand Up @@ -52,15 +52,17 @@ impl ToJson for LayoutTree {
inner_map.insert(format!("Workspace {}", name), Json::Array(children));
return Json::Object(inner_map);
}
&Container::Container { ref layout, .. } => {
&Container::Container { ref layout, id, .. } => {
let mut inner_map = BTreeMap::new();
let children = tree.tree.children_of(node_ix).iter()
.map(|node| node_to_json(*node, tree)).collect();
inner_map.insert(format!("Container w/ layout {:?}", layout), Json::Array(children));
inner_map.insert(format!("Container w/ layout {:?} and id {:?}", layout, id),
Json::Array(children));
return Json::Object(inner_map);
}
&Container::View { ref handle, .. } => {
return Json::String(handle.get_title());
&Container::View { ref handle, id, .. } => {
return Json::String(format!("View: title: \"{:?}\", class: \"{:?}\", id: {}",
handle.get_title(), handle.get_class(), id));
},
ref container => {
let mut inner_map = BTreeMap::new();
Expand Down

0 comments on commit 76b4369

Please sign in to comment.