Add comment for setContext call

This commit is contained in:
Koen Vlaswinkel
2022-10-21 10:45:18 +02:00
parent 66c6bf5e86
commit ad41a043a7

View File

@@ -56,6 +56,7 @@ export class MockGitHubApiServer extends DisposableObject {
}
this.recorder.start();
// Set a value in the context to track whether we are recording. This allows us to use this to show/hide commands (see package.json)
await commands.executeCommand('setContext', 'codeQLMockGitHubApiServer.recording', true);
await window.showInformationMessage('Recording scenario. To save the scenario, use the "CodeQL Mock GitHub API Server: Save Scenario" command.');
@@ -67,6 +68,7 @@ export class MockGitHubApiServer extends DisposableObject {
return;
}
// Set a value in the context to track whether we are recording. This allows us to use this to show/hide commands (see package.json)
await commands.executeCommand('setContext', 'codeQLMockGitHubApiServer.recording', false);
if (!this.recorder.isRecording) {
@@ -112,6 +114,7 @@ export class MockGitHubApiServer extends DisposableObject {
}
private async stopRecording(): Promise<void> {
// Set a value in the context to track whether we are recording. This allows us to use this to show/hide commands (see package.json)
await commands.executeCommand('setContext', 'codeQLMockGitHubApiServer.recording', false);
await this.recorder.stop();