瀏覽代碼

Adds parent to DBG output for nodes

main
Eric Amodio 5 年之前
父節點
當前提交
faa8a3adf2
共有 1 個文件被更改,包括 11 次插入1 次删除
  1. +11
    -1
      src/views/viewBase.ts

+ 11
- 1
src/views/viewBase.ts 查看文件

@ -61,7 +61,17 @@ export abstract class ViewBase> 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;
};
}

Loading…
取消
儲存