Ver código fonte

Adds parent to DBG output for nodes

main
Eric Amodio 5 anos atrás
pai
commit
faa8a3adf2
1 arquivos alterados com 11 adições e 1 exclusões
  1. +11
    -1
      src/views/viewBase.ts

+ 11
- 1
src/views/viewBase.ts Ver arquivo

@ -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;
};
}

Carregando…
Cancelar
Salvar