From faa8a3adf273e2ab18f2c5f9cef94ccc24de934a Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Sat, 28 Sep 2019 02:25:43 -0400 Subject: [PATCH] Adds parent to DBG output for nodes --- src/views/viewBase.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/views/viewBase.ts b/src/views/viewBase.ts index 865f4f1..3918c48 100644 --- a/src/views/viewBase.ts +++ b/src/views/viewBase.ts @@ -61,7 +61,17 @@ export abstract class ViewBase> implements TreeData this.getTreeItem = async function(this: ViewBase, 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; }; }