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:
@ -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;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user