Add "current window" command to testresolver.

Seems like this is necessary to use the testresolver with normal extension debugging
This commit is contained in:
Rob Lourens 2021-12-10 11:36:46 -08:00
parent b3b82c0540
commit ad57fde11d
2 changed files with 9 additions and 0 deletions

View file

@ -23,6 +23,7 @@
"activationEvents": [
"onResolveRemoteAuthority:test",
"onCommand:vscode-testresolver.newWindow",
"onCommand:vscode-testresolver.currentWindow",
"onCommand:vscode-testresolver.newWindowWithError",
"onCommand:vscode-testresolver.showLog",
"onCommand:vscode-testresolver.openTunnel",
@ -59,6 +60,11 @@
"category": "Remote-TestResolver",
"command": "vscode-testresolver.newWindow"
},
{
"title": "Connect to TestResolver in Current Window",
"category": "Remote-TestResolver",
"command": "vscode-testresolver.currentWindow"
},
{
"title": "Show TestResolver Log",
"category": "Remote-TestResolver",

View file

@ -263,6 +263,9 @@ export function activate(context: vscode.ExtensionContext) {
context.subscriptions.push(vscode.commands.registerCommand('vscode-testresolver.newWindow', () => {
return vscode.commands.executeCommand('vscode.newWindow', { remoteAuthority: 'test+test' });
}));
context.subscriptions.push(vscode.commands.registerCommand('vscode-testresolver.currentWindow', () => {
return vscode.commands.executeCommand('vscode.newWindow', { remoteAuthority: 'test+test', reuseWindow: true });
}));
context.subscriptions.push(vscode.commands.registerCommand('vscode-testresolver.newWindowWithError', () => {
return vscode.commands.executeCommand('vscode.newWindow', { remoteAuthority: 'test+error' });
}));