Pārlūkot izejas kodu

Fixes debug view tooltips

main
Eric Amodio pirms 3 gadiem
vecāks
revīzija
ba9a40bf18
1 mainītis faili ar 13 papildinājumiem un 10 dzēšanām
  1. +13
    -10
      src/views/viewBase.ts

+ 13
- 10
src/views/viewBase.ts Parādīt failu

@ -116,21 +116,24 @@ export abstract class ViewBase<
const item = await getTreeItem.apply(this, [node]);
const parent = node.getParent();
let tooltip = item.tooltip;
if (tooltip == null) {
item.tooltip = tooltip = new MarkdownString(
if (item.tooltip == null) {
item.tooltip = new MarkdownString(
item.label != null && typeof item.label !== 'string' ? item.label.label : item.label ?? '',
);
} else if (typeof tooltip === 'string') {
item.tooltip = tooltip = new MarkdownString(tooltip);
}
tooltip.appendMarkdown(
`\n\n---\n\ncontext: \`${item.contextValue}\`\n\nnode: \`${node.toString()}\`${
parent != null ? `\n\nparent: \`${parent.toString()}\`` : ''
}`,
);
if (typeof item.tooltip === 'string') {
item.tooltip = `${item.tooltip}\n\n---\ncontext: ${item.contextValue}\nnode: ${node.toString()}${
parent != null ? `\nparent: ${parent.toString()}` : ''
}`;
} else {
item.tooltip.appendMarkdown(
`\n\n---\n\ncontext: \`${item.contextValue}\`\n\nnode: \`${node.toString()}\`${
parent != null ? `\n\nparent: \`${parent.toString()}\`` : ''
}`,
);
}
return item;
};

Notiek ielāde…
Atcelt
Saglabāt