Skip to content

Commit

Permalink
Adds parent to DBG output for nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
eamodio committed Sep 28, 2019
1 parent 7980fff commit faa8a3a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/views/viewBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,17 @@ export abstract class ViewBase<TRoot extends ViewNode<View>> implements TreeData
this.getTreeItem = async function(this: ViewBase<TRoot>, node: ViewNode) {
const item = await fn.apply(this, [node]);

item.tooltip = `${item.tooltip || item.label}\n\nDBG: ${node.toString()}, ${item.contextValue}`;
const parent = node.getParent();
if (parent !== undefined) {
item.tooltip = `${item.tooltip ||
item.label}\n\nDBG:\nnode: ${node.toString()}\nparent: ${parent.toString()}\ncontext: ${
item.contextValue
}`;
} else {
item.tooltip = `${item.tooltip || item.label}\n\nDBG:\nnode: ${node.toString()}\ncontext: ${
item.contextValue
}`;
}
return item;
};
}
Expand Down

0 comments on commit faa8a3a

Please sign in to comment.