(context: vscode.ExtensionContext)
| 6 | // this method is called when your extension is activated |
| 7 | // your extension is activated the very first time the command is executed |
| 8 | export function activate(context: vscode.ExtensionContext): void { |
| 9 | context.subscriptions.push(vscode.commands.registerCommand('getting-started-sample.runCommand', async () => { |
| 10 | await new Promise(resolve => setTimeout(resolve, 1000)); |
| 11 | vscode.commands.executeCommand('getting-started-sample.sayHello', vscode.Uri.joinPath(context.extensionUri, 'sample-folder')); |
| 12 | })); |
| 13 | |
| 14 | context.subscriptions.push(vscode.commands.registerCommand('getting-started-sample.changeSetting', async () => { |
| 15 | await new Promise(resolve => setTimeout(resolve, 1000)); |
| 16 | vscode.workspace.getConfiguration('getting-started-sample').update('sampleSetting', true); |
| 17 | })); |
| 18 | |
| 19 | context.subscriptions.push(vscode.commands.registerCommand('getting-started-sample.setContext', async () => { |
| 20 | await new Promise(resolve => setTimeout(resolve, 1000)); |
| 21 | vscode.commands.executeCommand('setContext', 'gettingStartedContextKey', true); |
| 22 | })); |
| 23 | |
| 24 | context.subscriptions.push(vscode.commands.registerCommand('getting-started-sample.sayHello', () => { |
| 25 | vscode.window.showInformationMessage('Hello'); |
| 26 | })); |
| 27 | |
| 28 | context.subscriptions.push(vscode.commands.registerCommand('getting-started-sample.viewSources', () => { |
| 29 | return { openFolder: vscode.Uri.joinPath(context.extensionUri, 'src') }; |
| 30 | })); |
| 31 | } |
nothing calls this directly
no outgoing calls
no test coverage detected