mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-06-13 07:10:26 +08:00
Add title to treeview sample
This commit is contained in:
@ -135,6 +135,10 @@
|
||||
{
|
||||
"command": "testView.reveal",
|
||||
"title": "Test View: Reveal"
|
||||
},
|
||||
{
|
||||
"command": "testView.changeTitle",
|
||||
"title": "Test View: Change Title"
|
||||
}
|
||||
],
|
||||
"menus": {
|
||||
|
||||
@ -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;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
1116
tree-view-sample/vscode.proposed.d.ts
vendored
1116
tree-view-sample/vscode.proposed.d.ts
vendored
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user