Add title to treeview sample

This commit is contained in:
Alex Ross
2019-10-09 17:29:14 +02:00
parent fd5f179cde
commit e65c542a07
3 changed files with 414 additions and 712 deletions

View File

@ -135,6 +135,10 @@
{
"command": "testView.reveal",
"title": "Test View: Reveal"
},
{
"command": "testView.changeTitle",
"title": "Test View: Change Title"
}
],
"menus": {

View File

@ -10,6 +10,12 @@ export class TestView {
await view.reveal({ key }, { focus: true, select: false, expand: true });
}
});
vscode.commands.registerCommand('testView.changeTitle', async () => {
const title = await vscode.window.showInputBox({ prompt: 'Type the new title for the Test View', placeHolder: view.title });
if (title) {
view.title = title;
}
});
}
}

File diff suppressed because it is too large Load Diff