Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/editor/browser/triggerInlineEditCommandsRegistry.ts
4774 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
/**
7
* Registry for commands that can trigger Inline Edits (NES) when invoked.
8
*/
9
export abstract class TriggerInlineEditCommandsRegistry {
10
11
private static REGISTERED_COMMANDS = new Set<string>();
12
13
public static getRegisteredCommands(): readonly string[] {
14
return [...TriggerInlineEditCommandsRegistry.REGISTERED_COMMANDS];
15
}
16
17
public static registerCommand(commandId: string): void {
18
TriggerInlineEditCommandsRegistry.REGISTERED_COMMANDS.add(commandId);
19
}
20
}
21
22