(userFriendlyCommand: schema.IUserFriendlyCommand, extension: IExtensionPointUser<any>, bucket: schema.IToolbarRegistrations[])
| 18 | }).setHandler((extensions: readonly IExtensionPointUser<schema.IUserFriendlyCommand | schema.IUserFriendlyCommand[]>[]) => { |
| 19 | console.log('-----------ToolbarsContribution------------'); |
| 20 | function handleCommand(userFriendlyCommand: schema.IUserFriendlyCommand, extension: IExtensionPointUser<any>, bucket: schema.IToolbarRegistrations[]) { |
| 21 | if (!schema.isValidCommand(userFriendlyCommand, extension.collector)) { |
| 22 | return; |
| 23 | } |
| 24 | const { when, alt, group, command, component } = userFriendlyCommand; |
| 25 | |
| 26 | if (MenuRegistry.getCommand(command)) { |
| 27 | extension.collector.info(localize('dup', "Command `{0}` appears multiple times in the `commands` section.", userFriendlyCommand.command)); |
| 28 | } |
| 29 | bucket.push({ |
| 30 | id: command, |
| 31 | command, |
| 32 | alt, |
| 33 | group, |
| 34 | component, |
| 35 | when: ContextKeyExpr.deserialize(when), |
| 36 | }); |
| 37 | } |
| 38 | |
| 39 | _commandRegistrations.clear(); |
| 40 |
no test coverage detected