MCPcopy Create free account
hub / github.com/angular/angular / registerCommands

Function registerCommands

vscode-ng-language-service/client/src/commands.ts:225–245  ·  view source on GitHub ↗
(
  client: AngularLanguageClient,
  context: vscode.ExtensionContext,
)

Source from the content-addressed store, hash-verified

223 * @param context extension context for adding disposables
224 */
225export function registerCommands(
226 client: AngularLanguageClient,
227 context: vscode.ExtensionContext,
228): void {
229 const commands: Command[] = [
230 restartNgServer(client),
231 openLogFile(client),
232 getTemplateTcb(client, context),
233 goToComponentWithTemplateFile(client),
234 goToTemplateForComponent(client),
235 openJsDocLinkCommand(),
236 applyCodeActionCommand(client),
237 ];
238
239 for (const command of commands) {
240 const disposable = command.isTextEditorCommand
241 ? vscode.commands.registerTextEditorCommand(command.id, command.execute)
242 : vscode.commands.registerCommand(command.id, command.execute);
243 context.subscriptions.push(disposable);
244 }
245}

Callers 1

startServerFunction · 0.90

Calls 8

restartNgServerFunction · 0.85
openLogFileFunction · 0.85
getTemplateTcbFunction · 0.85
goToTemplateForComponentFunction · 0.85
openJsDocLinkCommandFunction · 0.85
applyCodeActionCommandFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected