@codingame/monaco-vscode-api 1.83.7 → 1.83.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (303) hide show
  1. package/extensions.js +5 -5
  2. package/lifecycle.js +23 -4
  3. package/missing-services.js +187 -24
  4. package/monaco-editor-treemending.patch +955 -955
  5. package/monaco.d.ts +7 -2
  6. package/monaco.js +12 -1
  7. package/package.json +15 -2
  8. package/service-override/tools/editor.d.ts +1 -1
  9. package/services.d.ts +4 -5
  10. package/services.js +31 -28
  11. package/vscode/src/vs/base/common/uriIpc.js +22 -1
  12. package/vscode/src/vs/base/parts/request/common/request.js +7 -1
  13. package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +116 -1
  14. package/vscode/src/vs/platform/extensionManagement/common/extensionManagementUtil.js +117 -2
  15. package/vscode/src/vs/platform/extensionRecommendations/common/extensionRecommendations.js +10 -0
  16. package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.js +42 -0
  17. package/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.js +12 -1
  18. package/vscode/src/vs/platform/extensions/common/extensionValidator.js +306 -1
  19. package/vscode/src/vs/platform/log/common/log.d.ts +27 -2
  20. package/vscode/src/vs/platform/remote/common/remoteAgentConnection.d.ts +9 -1
  21. package/vscode/src/vs/platform/remote/common/remoteExtensionsScanner.js +2 -1
  22. package/vscode/src/vs/platform/request/common/request.js +38 -1
  23. package/vscode/src/vs/platform/telemetry/common/telemetryUtils.js +2 -1
  24. package/vscode/src/vs/platform/tunnel/common/tunnel.d.ts +50 -1
  25. package/vscode/src/vs/platform/userDataProfile/common/userDataProfileIpc.js +63 -0
  26. package/vscode/src/vs/platform/userDataSync/common/ignoredExtensions.js +65 -0
  27. package/vscode/src/vs/platform/userDataSync/common/userDataSync.js +2 -1
  28. package/vscode/src/vs/platform/userDataSync/common/userDataSyncAccount.js +3 -0
  29. package/vscode/src/vs/platform/workspace/common/workspace.d.ts +16 -1
  30. package/vscode/src/vs/platform/workspaces/common/workspaces.d.ts +6 -2
  31. package/vscode/src/vs/workbench/api/worker/extensionHostWorker.js +1 -1
  32. package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +6 -3
  33. package/vscode/src/vs/workbench/common/editor/diffEditorInput.js +7 -2
  34. package/vscode/src/vs/workbench/common/editor/sideBySideEditorInput.js +56 -2
  35. package/vscode/src/vs/workbench/common/editor.d.ts +17 -1
  36. package/vscode/src/vs/workbench/common/theme.js +3 -3
  37. package/vscode/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.css.js +4 -0
  38. package/vscode/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.js +248 -0
  39. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +3291 -0
  40. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsIcons.js +16 -16
  41. package/vscode/src/vs/workbench/contrib/extensions/browser/media/extensionActions.css.js +4 -0
  42. package/vscode/src/vs/workbench/contrib/extensions/common/extensions.js +45 -1
  43. package/vscode/src/vs/workbench/contrib/extensions/common/extensionsFileTemplate.js +67 -0
  44. package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +396 -0
  45. package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagement.d.ts +23 -3
  46. package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagement.js +4 -1
  47. package/vscode/src/vs/workbench/services/extensionRecommendations/common/extensionRecommendations.js +4 -0
  48. package/vscode/src/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.js +255 -0
  49. package/vscode/src/vs/workbench/services/extensions/browser/extensionService.d.ts +44 -0
  50. package/vscode/src/vs/workbench/services/extensions/common/extensionDescriptionRegistry.d.ts +1 -1
  51. package/vscode/src/vs/workbench/services/extensions/common/extensionHostProtocol.d.ts +1 -1
  52. package/vscode/src/vs/workbench/services/extensions/common/extensions.js +2 -1
  53. package/vscode/src/vs/workbench/services/localization/common/locale.js +4 -0
  54. package/vscode/src/vs/workbench/services/log/common/logConstants.js +2 -1
  55. package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.d.ts +68 -0
  56. package/vscode/src/vs/workbench/services/remote/common/tunnelModel.d.ts +172 -1
  57. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorHandler.js +53 -2
  58. package/vscode/src/vs/workbench/services/userDataProfile/common/remoteUserDataProfiles.js +150 -0
  59. package/vscode/src/vs/workbench/services/userDataSync/common/userDataSync.js +3 -1
  60. package/vscode/src/vs/workbench/services/workspaces/browser/workspaces.js +7 -1
  61. package/vscode.proposed.d.ts +4787 -0
  62. package/workbench.js +37 -0
  63. package/service-override/bulkEdit.js +0 -9
  64. package/service-override/environment.js +0 -21
  65. package/service-override/extensions.js +0 -465
  66. package/service-override/files.js +0 -447
  67. package/service-override/keybindings.js +0 -93
  68. package/service-override/layout.js +0 -230
  69. package/service-override/output.js +0 -21
  70. package/service-override/quickaccess.js +0 -98
  71. package/vscode/src/vs/base/common/console.js +0 -58
  72. package/vscode/src/vs/base/common/keybindingParser.js +0 -87
  73. package/vscode/src/vs/base/common/prefixTree.js +0 -130
  74. package/vscode/src/vs/base/common/tfIdf.js +0 -137
  75. package/vscode/src/vs/editor/contrib/quickAccess/browser/commandsQuickAccess.js +0 -23
  76. package/vscode/src/vs/platform/files/browser/indexedDBFileSystemProvider.js +0 -404
  77. package/vscode/src/vs/platform/files/common/fileService.js +0 -957
  78. package/vscode/src/vs/platform/files/common/files.js +0 -81
  79. package/vscode/src/vs/platform/files/common/inMemoryFilesystemProvider.js +0 -220
  80. package/vscode/src/vs/platform/files/common/io.js +0 -75
  81. package/vscode/src/vs/platform/files/common/watcher.js +0 -69
  82. package/vscode/src/vs/platform/keyboardLayout/common/keyboardConfig.js +0 -48
  83. package/vscode/src/vs/platform/keyboardLayout/common/keyboardMapper.js +0 -23
  84. package/vscode/src/vs/platform/lifecycle/common/lifecycle.js +0 -25
  85. package/vscode/src/vs/platform/log/common/fileLog.js +0 -105
  86. package/vscode/src/vs/platform/quickinput/browser/commandsQuickAccess.js +0 -331
  87. package/vscode/src/vs/platform/quickinput/browser/helpQuickAccess.js +0 -65
  88. package/vscode/src/vs/platform/remote/common/managedSocket.js +0 -96
  89. package/vscode/src/vs/workbench/api/browser/mainThreadAiEmbeddingVector.js +0 -29
  90. package/vscode/src/vs/workbench/api/browser/mainThreadAiRelatedInformation.js +0 -33
  91. package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +0 -328
  92. package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +0 -66
  93. package/vscode/src/vs/workbench/api/browser/mainThreadChat.js +0 -172
  94. package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents.js +0 -50
  95. package/vscode/src/vs/workbench/api/browser/mainThreadChatProvider.js +0 -59
  96. package/vscode/src/vs/workbench/api/browser/mainThreadChatSlashCommands.js +0 -47
  97. package/vscode/src/vs/workbench/api/browser/mainThreadChatVariables.js +0 -29
  98. package/vscode/src/vs/workbench/api/browser/mainThreadClipboard.js +0 -22
  99. package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.js +0 -105
  100. package/vscode/src/vs/workbench/api/browser/mainThreadCommands.js +0 -92
  101. package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +0 -539
  102. package/vscode/src/vs/workbench/api/browser/mainThreadConfiguration.js +0 -78
  103. package/vscode/src/vs/workbench/api/browser/mainThreadConsole.js +0 -33
  104. package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +0 -576
  105. package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +0 -385
  106. package/vscode/src/vs/workbench/api/browser/mainThreadDecorations.js +0 -100
  107. package/vscode/src/vs/workbench/api/browser/mainThreadDiagnostics.js +0 -67
  108. package/vscode/src/vs/workbench/api/browser/mainThreadDialogs.js +0 -66
  109. package/vscode/src/vs/workbench/api/browser/mainThreadDocumentContentProviders.js +0 -73
  110. package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +0 -247
  111. package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +0 -368
  112. package/vscode/src/vs/workbench/api/browser/mainThreadDownloadService.js +0 -20
  113. package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +0 -39
  114. package/vscode/src/vs/workbench/api/browser/mainThreadEditor.js +0 -409
  115. package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +0 -473
  116. package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +0 -225
  117. package/vscode/src/vs/workbench/api/browser/mainThreadErrors.js +0 -22
  118. package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +0 -315
  119. package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js +0 -278
  120. package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +0 -281
  121. package/vscode/src/vs/workbench/api/browser/mainThreadInlineChat.js +0 -66
  122. package/vscode/src/vs/workbench/api/browser/mainThreadInteractive.js +0 -26
  123. package/vscode/src/vs/workbench/api/browser/mainThreadIssueReporter.js +0 -31
  124. package/vscode/src/vs/workbench/api/browser/mainThreadLabelService.js +0 -25
  125. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +0 -945
  126. package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.js +0 -76
  127. package/vscode/src/vs/workbench/api/browser/mainThreadLocalization.js +0 -33
  128. package/vscode/src/vs/workbench/api/browser/mainThreadLogService.js +0 -76
  129. package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.js +0 -91
  130. package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +0 -116
  131. package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +0 -156
  132. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocuments.js +0 -121
  133. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +0 -186
  134. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.js +0 -127
  135. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.js +0 -129
  136. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +0 -339
  137. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookRenderers.js +0 -23
  138. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +0 -46
  139. package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +0 -74
  140. package/vscode/src/vs/workbench/api/browser/mainThreadProfilContentHandlers.js +0 -36
  141. package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +0 -66
  142. package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.js +0 -47
  143. package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.js +0 -183
  144. package/vscode/src/vs/workbench/api/browser/mainThreadRemoteConnectionData.js +0 -28
  145. package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +0 -461
  146. package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +0 -47
  147. package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +0 -146
  148. package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.js +0 -68
  149. package/vscode/src/vs/workbench/api/browser/mainThreadShare.js +0 -48
  150. package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.js +0 -51
  151. package/vscode/src/vs/workbench/api/browser/mainThreadStorage.js +0 -70
  152. package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +0 -729
  153. package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.js +0 -51
  154. package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +0 -410
  155. package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +0 -180
  156. package/vscode/src/vs/workbench/api/browser/mainThreadTheming.js +0 -22
  157. package/vscode/src/vs/workbench/api/browser/mainThreadTimeline.js +0 -53
  158. package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.js +0 -311
  159. package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +0 -221
  160. package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +0 -108
  161. package/vscode/src/vs/workbench/api/browser/mainThreadUrls.js +0 -59
  162. package/vscode/src/vs/workbench/api/browser/mainThreadWebviewManager.js +0 -27
  163. package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +0 -281
  164. package/vscode/src/vs/workbench/api/browser/mainThreadWebviewViews.js +0 -98
  165. package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +0 -133
  166. package/vscode/src/vs/workbench/api/browser/mainThreadWindow.js +0 -55
  167. package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +0 -271
  168. package/vscode/src/vs/workbench/api/common/shared/dataTransferCache.js +0 -33
  169. package/vscode/src/vs/workbench/browser/actions/quickAccessActions.js +0 -230
  170. package/vscode/src/vs/workbench/browser/contextkeys.js +0 -249
  171. package/vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkEditService.js +0 -358
  172. package/vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkFileEdits.js +0 -362
  173. package/vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkTextEdits.js +0 -265
  174. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +0 -2
  175. package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +0 -215
  176. package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.js +0 -86
  177. package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +0 -55
  178. package/vscode/src/vs/workbench/contrib/comments/browser/commentFormActions.js +0 -49
  179. package/vscode/src/vs/workbench/contrib/comments/browser/commentGlyphWidget.js +0 -90
  180. package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +0 -646
  181. package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +0 -295
  182. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadAdditionalActions.js +0 -60
  183. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +0 -247
  184. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +0 -107
  185. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadRangeDecorator.js +0 -107
  186. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +0 -329
  187. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.js +0 -378
  188. package/vscode/src/vs/workbench/contrib/comments/browser/comments.js +0 -3
  189. package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +0 -1194
  190. package/vscode/src/vs/workbench/contrib/comments/browser/commentsFilterOptions.js +0 -17
  191. package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +0 -332
  192. package/vscode/src/vs/workbench/contrib/comments/browser/commentsView.js +0 -541
  193. package/vscode/src/vs/workbench/contrib/comments/browser/commentsViewActions.js +0 -176
  194. package/vscode/src/vs/workbench/contrib/comments/browser/media/panel.css.js +0 -4
  195. package/vscode/src/vs/workbench/contrib/comments/browser/media/review.css.js +0 -4
  196. package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +0 -99
  197. package/vscode/src/vs/workbench/contrib/comments/browser/timestamp.js +0 -55
  198. package/vscode/src/vs/workbench/contrib/comments/common/commentModel.js +0 -143
  199. package/vscode/src/vs/workbench/contrib/comments/common/commentsConfiguration.js +0 -2
  200. package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +0 -71
  201. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.js +0 -81
  202. package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveEditorInput.js +0 -177
  203. package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveHistoryService.js +0 -3
  204. package/vscode/src/vs/workbench/contrib/keybindings/browser/keybindings.contribution.js +0 -28
  205. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +0 -142
  206. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +0 -480
  207. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController.js +0 -5
  208. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/diffComputer.js +0 -83
  209. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/editing.js +0 -54
  210. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/lineRange.js +0 -108
  211. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mapping.js +0 -258
  212. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +0 -614
  213. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange.js +0 -307
  214. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/rangeUtils.js +0 -36
  215. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +0 -165
  216. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/telemetry.js +0 -78
  217. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/utils.js +0 -68
  218. package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +0 -2
  219. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +0 -106
  220. package/vscode/src/vs/workbench/contrib/output/browser/output.contribution.js +0 -487
  221. package/vscode/src/vs/workbench/contrib/output/browser/outputLinkProvider.js +0 -76
  222. package/vscode/src/vs/workbench/contrib/output/browser/outputServices.js +0 -166
  223. package/vscode/src/vs/workbench/contrib/output/browser/outputView.js +0 -234
  224. package/vscode/src/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.js +0 -287
  225. package/vscode/src/vs/workbench/contrib/quickaccess/browser/quickAccess.contribution.js +0 -167
  226. package/vscode/src/vs/workbench/contrib/quickaccess/browser/viewQuickAccess.js +0 -263
  227. package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +0 -504
  228. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProcessExtHostProxy.js +0 -130
  229. package/vscode/src/vs/workbench/contrib/testing/common/getComputedState.js +0 -101
  230. package/vscode/src/vs/workbench/contrib/testing/common/observableValue.js +0 -26
  231. package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.js +0 -23
  232. package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +0 -334
  233. package/vscode/src/vs/workbench/contrib/testing/common/testingStates.js +0 -45
  234. package/vscode/src/vs/workbench/services/actions/common/menusExtensionPoint.js +0 -1286
  235. package/vscode/src/vs/workbench/services/commands/common/commandService.js +0 -77
  236. package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +0 -141
  237. package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +0 -271
  238. package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.js +0 -50
  239. package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +0 -1091
  240. package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.js +0 -40
  241. package/vscode/src/vs/workbench/services/extensions/common/extensionDevOptions.js +0 -23
  242. package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +0 -641
  243. package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js +0 -272
  244. package/vscode/src/vs/workbench/services/extensions/common/extensionStorageMigration.js +0 -56
  245. package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +0 -78
  246. package/vscode/src/vs/workbench/services/extensions/common/remoteConsoleUtil.js +0 -47
  247. package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +0 -218
  248. package/vscode/src/vs/workbench/services/keybinding/browser/keybindingService.js +0 -917
  249. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayoutService.js +0 -498
  250. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution.js +0 -13
  251. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/cz.win.js +0 -162
  252. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/de-swiss.win.js +0 -162
  253. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/de.darwin.js +0 -125
  254. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/de.linux.js +0 -180
  255. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/de.win.js +0 -162
  256. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/dk.win.js +0 -162
  257. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/dvorak.darwin.js +0 -125
  258. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/en-belgian.win.js +0 -162
  259. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/en-ext.darwin.js +0 -125
  260. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/en-in.win.js +0 -162
  261. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/en-intl.darwin.js +0 -125
  262. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/en-intl.win.js +0 -162
  263. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/en-uk.darwin.js +0 -125
  264. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/en-uk.win.js +0 -162
  265. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/en.darwin.js +0 -133
  266. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/en.linux.js +0 -182
  267. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/en.win.js +0 -167
  268. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/es-latin.win.js +0 -162
  269. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/es.darwin.js +0 -125
  270. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/es.linux.js +0 -180
  271. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/es.win.js +0 -162
  272. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/fr.darwin.js +0 -125
  273. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/fr.linux.js +0 -180
  274. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/fr.win.js +0 -162
  275. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/hu.win.js +0 -162
  276. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/it.darwin.js +0 -125
  277. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/it.win.js +0 -162
  278. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/jp-roman.darwin.js +0 -125
  279. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/jp.darwin.js +0 -125
  280. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/ko.darwin.js +0 -125
  281. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/layout.contribution.darwin.js +0 -17
  282. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/layout.contribution.linux.js +0 -6
  283. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/layout.contribution.win.js +0 -23
  284. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/no.win.js +0 -162
  285. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/pl.darwin.js +0 -125
  286. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/pl.win.js +0 -162
  287. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/pt-br.win.js +0 -162
  288. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/pt.darwin.js +0 -125
  289. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/pt.win.js +0 -162
  290. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/ru.darwin.js +0 -125
  291. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/ru.linux.js +0 -180
  292. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/ru.win.js +0 -162
  293. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/sv.win.js +0 -164
  294. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/thai.win.js +0 -162
  295. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/tr.win.js +0 -162
  296. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/zh-hans.darwin.js +0 -125
  297. package/vscode/src/vs/workbench/services/keybinding/common/keybindingIO.js +0 -72
  298. package/vscode/src/vs/workbench/services/keybinding/common/keymapInfo.js +0 -108
  299. package/vscode/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.js +0 -886
  300. package/vscode/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.js +0 -350
  301. package/vscode/src/vs/workbench/services/quickinput/browser/quickInputService.js +0 -67
  302. package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +0 -4
  303. package/vscode/src/vs/workbench/services/workingCopy/common/resourceWorkingCopy.js +0 -77
@@ -1,1286 +0,0 @@
1
- import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
2
- import { isFalsyOrWhitespace } from 'monaco-editor/esm/vs/base/common/strings.js';
3
- import * as resources from 'monaco-editor/esm/vs/base/common/resources.js';
4
- import { ExtensionsRegistry } from '../../extensions/common/extensionsRegistry.js';
5
- import { ContextKeyExpr } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
6
- import { MenuId, MenuRegistry } from 'monaco-editor/esm/vs/platform/actions/common/actions.js';
7
- import { DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
8
- import { ThemeIcon } from 'monaco-editor/esm/vs/base/common/themables.js';
9
- import { index } from 'monaco-editor/esm/vs/base/common/arrays.js';
10
- import { isProposedApiEnabled } from '../../extensions/common/extensions.js';
11
- const apiMenus = [
12
- {
13
- key: 'commandPalette',
14
- id: MenuId.CommandPalette,
15
- description: ( localizeWithPath(
16
- 'vs/workbench/services/actions/common/menusExtensionPoint',
17
- 'menus.commandPalette',
18
- "The Command Palette"
19
- )),
20
- supportsSubmenus: false
21
- },
22
- {
23
- key: 'touchBar',
24
- id: MenuId.TouchBarContext,
25
- description: ( localizeWithPath(
26
- 'vs/workbench/services/actions/common/menusExtensionPoint',
27
- 'menus.touchBar',
28
- "The touch bar (macOS only)"
29
- )),
30
- supportsSubmenus: false
31
- },
32
- {
33
- key: 'editor/title',
34
- id: MenuId.EditorTitle,
35
- description: ( localizeWithPath(
36
- 'vs/workbench/services/actions/common/menusExtensionPoint',
37
- 'menus.editorTitle',
38
- "The editor title menu"
39
- ))
40
- },
41
- {
42
- key: 'editor/title/run',
43
- id: MenuId.EditorTitleRun,
44
- description: ( localizeWithPath(
45
- 'vs/workbench/services/actions/common/menusExtensionPoint',
46
- 'menus.editorTitleRun',
47
- "Run submenu inside the editor title menu"
48
- ))
49
- },
50
- {
51
- key: 'editor/context',
52
- id: MenuId.EditorContext,
53
- description: ( localizeWithPath(
54
- 'vs/workbench/services/actions/common/menusExtensionPoint',
55
- 'menus.editorContext',
56
- "The editor context menu"
57
- ))
58
- },
59
- {
60
- key: 'editor/context/copy',
61
- id: MenuId.EditorContextCopy,
62
- description: ( localizeWithPath(
63
- 'vs/workbench/services/actions/common/menusExtensionPoint',
64
- 'menus.editorContextCopyAs',
65
- "'Copy as' submenu in the editor context menu"
66
- ))
67
- },
68
- {
69
- key: 'editor/context/share',
70
- id: MenuId.EditorContextShare,
71
- description: ( localizeWithPath(
72
- 'vs/workbench/services/actions/common/menusExtensionPoint',
73
- 'menus.editorContextShare',
74
- "'Share' submenu in the editor context menu"
75
- )),
76
- proposed: 'contribShareMenu'
77
- },
78
- {
79
- key: 'explorer/context',
80
- id: MenuId.ExplorerContext,
81
- description: ( localizeWithPath(
82
- 'vs/workbench/services/actions/common/menusExtensionPoint',
83
- 'menus.explorerContext',
84
- "The file explorer context menu"
85
- ))
86
- },
87
- {
88
- key: 'explorer/context/share',
89
- id: MenuId.ExplorerContextShare,
90
- description: ( localizeWithPath(
91
- 'vs/workbench/services/actions/common/menusExtensionPoint',
92
- 'menus.explorerContextShare',
93
- "'Share' submenu in the file explorer context menu"
94
- )),
95
- proposed: 'contribShareMenu'
96
- },
97
- {
98
- key: 'editor/title/context',
99
- id: MenuId.EditorTitleContext,
100
- description: ( localizeWithPath(
101
- 'vs/workbench/services/actions/common/menusExtensionPoint',
102
- 'menus.editorTabContext',
103
- "The editor tabs context menu"
104
- ))
105
- },
106
- {
107
- key: 'editor/title/context/share',
108
- id: MenuId.EditorTitleContextShare,
109
- description: ( localizeWithPath(
110
- 'vs/workbench/services/actions/common/menusExtensionPoint',
111
- 'menus.editorTitleContextShare',
112
- "'Share' submenu inside the editor title context menu"
113
- )),
114
- proposed: 'contribShareMenu'
115
- },
116
- {
117
- key: 'debug/callstack/context',
118
- id: MenuId.DebugCallStackContext,
119
- description: ( localizeWithPath(
120
- 'vs/workbench/services/actions/common/menusExtensionPoint',
121
- 'menus.debugCallstackContext',
122
- "The debug callstack view context menu"
123
- ))
124
- },
125
- {
126
- key: 'debug/variables/context',
127
- id: MenuId.DebugVariablesContext,
128
- description: ( localizeWithPath(
129
- 'vs/workbench/services/actions/common/menusExtensionPoint',
130
- 'menus.debugVariablesContext',
131
- "The debug variables view context menu"
132
- ))
133
- },
134
- {
135
- key: 'debug/toolBar',
136
- id: MenuId.DebugToolBar,
137
- description: ( localizeWithPath(
138
- 'vs/workbench/services/actions/common/menusExtensionPoint',
139
- 'menus.debugToolBar',
140
- "The debug toolbar menu"
141
- ))
142
- },
143
- {
144
- key: 'menuBar/home',
145
- id: MenuId.MenubarHomeMenu,
146
- description: ( localizeWithPath(
147
- 'vs/workbench/services/actions/common/menusExtensionPoint',
148
- 'menus.home',
149
- "The home indicator context menu (web only)"
150
- )),
151
- proposed: 'contribMenuBarHome',
152
- supportsSubmenus: false
153
- },
154
- {
155
- key: 'menuBar/edit/copy',
156
- id: MenuId.MenubarCopy,
157
- description: ( localizeWithPath(
158
- 'vs/workbench/services/actions/common/menusExtensionPoint',
159
- 'menus.opy',
160
- "'Copy as' submenu in the top level Edit menu"
161
- ))
162
- },
163
- {
164
- key: 'scm/title',
165
- id: MenuId.SCMTitle,
166
- description: ( localizeWithPath(
167
- 'vs/workbench/services/actions/common/menusExtensionPoint',
168
- 'menus.scmTitle',
169
- "The Source Control title menu"
170
- ))
171
- },
172
- {
173
- key: 'scm/sourceControl',
174
- id: MenuId.SCMSourceControl,
175
- description: ( localizeWithPath(
176
- 'vs/workbench/services/actions/common/menusExtensionPoint',
177
- 'menus.scmSourceControl',
178
- "The Source Control menu"
179
- ))
180
- },
181
- {
182
- key: 'scm/resourceState/context',
183
- id: MenuId.SCMResourceContext,
184
- description: ( localizeWithPath(
185
- 'vs/workbench/services/actions/common/menusExtensionPoint',
186
- 'menus.resourceStateContext',
187
- "The Source Control resource state context menu"
188
- ))
189
- },
190
- {
191
- key: 'scm/resourceFolder/context',
192
- id: MenuId.SCMResourceFolderContext,
193
- description: ( localizeWithPath(
194
- 'vs/workbench/services/actions/common/menusExtensionPoint',
195
- 'menus.resourceFolderContext',
196
- "The Source Control resource folder context menu"
197
- ))
198
- },
199
- {
200
- key: 'scm/resourceGroup/context',
201
- id: MenuId.SCMResourceGroupContext,
202
- description: ( localizeWithPath(
203
- 'vs/workbench/services/actions/common/menusExtensionPoint',
204
- 'menus.resourceGroupContext',
205
- "The Source Control resource group context menu"
206
- ))
207
- },
208
- {
209
- key: 'scm/change/title',
210
- id: MenuId.SCMChangeContext,
211
- description: ( localizeWithPath(
212
- 'vs/workbench/services/actions/common/menusExtensionPoint',
213
- 'menus.changeTitle',
214
- "The Source Control inline change menu"
215
- ))
216
- },
217
- {
218
- key: 'statusBar/remoteIndicator',
219
- id: MenuId.StatusBarRemoteIndicatorMenu,
220
- description: ( localizeWithPath(
221
- 'vs/workbench/services/actions/common/menusExtensionPoint',
222
- 'menus.statusBarRemoteIndicator',
223
- "The remote indicator menu in the status bar"
224
- )),
225
- supportsSubmenus: false
226
- },
227
- {
228
- key: 'terminal/context',
229
- id: MenuId.TerminalInstanceContext,
230
- description: ( localizeWithPath(
231
- 'vs/workbench/services/actions/common/menusExtensionPoint',
232
- 'menus.terminalContext',
233
- "The terminal context menu"
234
- ))
235
- },
236
- {
237
- key: 'terminal/title/context',
238
- id: MenuId.TerminalTabContext,
239
- description: ( localizeWithPath(
240
- 'vs/workbench/services/actions/common/menusExtensionPoint',
241
- 'menus.terminalTabContext',
242
- "The terminal tabs context menu"
243
- ))
244
- },
245
- {
246
- key: 'view/title',
247
- id: MenuId.ViewTitle,
248
- description: ( localizeWithPath(
249
- 'vs/workbench/services/actions/common/menusExtensionPoint',
250
- 'view.viewTitle',
251
- "The contributed view title menu"
252
- ))
253
- },
254
- {
255
- key: 'view/item/context',
256
- id: MenuId.ViewItemContext,
257
- description: ( localizeWithPath(
258
- 'vs/workbench/services/actions/common/menusExtensionPoint',
259
- 'view.itemContext',
260
- "The contributed view item context menu"
261
- ))
262
- },
263
- {
264
- key: 'comments/comment/editorActions',
265
- id: MenuId.CommentEditorActions,
266
- description: ( localizeWithPath(
267
- 'vs/workbench/services/actions/common/menusExtensionPoint',
268
- 'commentThread.editorActions',
269
- "The contributed comment editor actions"
270
- )),
271
- proposed: 'contribCommentEditorActionsMenu'
272
- },
273
- {
274
- key: 'comments/commentThread/title',
275
- id: MenuId.CommentThreadTitle,
276
- description: ( localizeWithPath(
277
- 'vs/workbench/services/actions/common/menusExtensionPoint',
278
- 'commentThread.title',
279
- "The contributed comment thread title menu"
280
- ))
281
- },
282
- {
283
- key: 'comments/commentThread/context',
284
- id: MenuId.CommentThreadActions,
285
- description: ( localizeWithPath(
286
- 'vs/workbench/services/actions/common/menusExtensionPoint',
287
- 'commentThread.actions',
288
- "The contributed comment thread context menu, rendered as buttons below the comment editor"
289
- )),
290
- supportsSubmenus: false
291
- },
292
- {
293
- key: 'comments/commentThread/additionalActions',
294
- id: MenuId.CommentThreadAdditionalActions,
295
- description: ( localizeWithPath(
296
- 'vs/workbench/services/actions/common/menusExtensionPoint',
297
- 'commentThread.actions',
298
- "The contributed comment thread context menu, rendered as buttons below the comment editor"
299
- )),
300
- supportsSubmenus: false,
301
- proposed: 'contribCommentThreadAdditionalMenu'
302
- },
303
- {
304
- key: 'comments/commentThread/title/context',
305
- id: MenuId.CommentThreadTitleContext,
306
- description: ( localizeWithPath(
307
- 'vs/workbench/services/actions/common/menusExtensionPoint',
308
- 'commentThread.titleContext',
309
- "The contributed comment thread title's peek context menu, rendered as a right click menu on the comment thread's peek title."
310
- )),
311
- proposed: 'contribCommentPeekContext'
312
- },
313
- {
314
- key: 'comments/comment/title',
315
- id: MenuId.CommentTitle,
316
- description: ( localizeWithPath(
317
- 'vs/workbench/services/actions/common/menusExtensionPoint',
318
- 'comment.title',
319
- "The contributed comment title menu"
320
- ))
321
- },
322
- {
323
- key: 'comments/comment/context',
324
- id: MenuId.CommentActions,
325
- description: ( localizeWithPath(
326
- 'vs/workbench/services/actions/common/menusExtensionPoint',
327
- 'comment.actions',
328
- "The contributed comment context menu, rendered as buttons below the comment editor"
329
- )),
330
- supportsSubmenus: false
331
- },
332
- {
333
- key: 'comments/commentThread/comment/context',
334
- id: MenuId.CommentThreadCommentContext,
335
- description: ( localizeWithPath(
336
- 'vs/workbench/services/actions/common/menusExtensionPoint',
337
- 'comment.commentContext',
338
- "The contributed comment context menu, rendered as a right click menu on the an individual comment in the comment thread's peek view."
339
- )),
340
- proposed: 'contribCommentPeekContext'
341
- },
342
- {
343
- key: 'notebook/toolbar',
344
- id: MenuId.NotebookToolbar,
345
- description: ( localizeWithPath(
346
- 'vs/workbench/services/actions/common/menusExtensionPoint',
347
- 'notebook.toolbar',
348
- "The contributed notebook toolbar menu"
349
- ))
350
- },
351
- {
352
- key: 'notebook/kernelSource',
353
- id: MenuId.NotebookKernelSource,
354
- description: ( localizeWithPath(
355
- 'vs/workbench/services/actions/common/menusExtensionPoint',
356
- 'notebook.kernelSource',
357
- "The contributed notebook kernel sources menu"
358
- )),
359
- proposed: 'notebookKernelSource'
360
- },
361
- {
362
- key: 'notebook/cell/title',
363
- id: MenuId.NotebookCellTitle,
364
- description: ( localizeWithPath(
365
- 'vs/workbench/services/actions/common/menusExtensionPoint',
366
- 'notebook.cell.title',
367
- "The contributed notebook cell title menu"
368
- ))
369
- },
370
- {
371
- key: 'notebook/cell/execute',
372
- id: MenuId.NotebookCellExecute,
373
- description: ( localizeWithPath(
374
- 'vs/workbench/services/actions/common/menusExtensionPoint',
375
- 'notebook.cell.execute',
376
- "The contributed notebook cell execution menu"
377
- ))
378
- },
379
- {
380
- key: 'interactive/toolbar',
381
- id: MenuId.InteractiveToolbar,
382
- description: ( localizeWithPath(
383
- 'vs/workbench/services/actions/common/menusExtensionPoint',
384
- 'interactive.toolbar',
385
- "The contributed interactive toolbar menu"
386
- )),
387
- },
388
- {
389
- key: 'interactive/cell/title',
390
- id: MenuId.InteractiveCellTitle,
391
- description: ( localizeWithPath(
392
- 'vs/workbench/services/actions/common/menusExtensionPoint',
393
- 'interactive.cell.title',
394
- "The contributed interactive cell title menu"
395
- )),
396
- },
397
- {
398
- key: 'testing/item/context',
399
- id: MenuId.TestItem,
400
- description: ( localizeWithPath(
401
- 'vs/workbench/services/actions/common/menusExtensionPoint',
402
- 'testing.item.context',
403
- "The contributed test item menu"
404
- )),
405
- },
406
- {
407
- key: 'testing/item/gutter',
408
- id: MenuId.TestItemGutter,
409
- description: ( localizeWithPath(
410
- 'vs/workbench/services/actions/common/menusExtensionPoint',
411
- 'testing.item.gutter.title',
412
- "The menu for a gutter decoration for a test item"
413
- )),
414
- },
415
- {
416
- key: 'testing/message/context',
417
- id: MenuId.TestMessageContext,
418
- description: ( localizeWithPath(
419
- 'vs/workbench/services/actions/common/menusExtensionPoint',
420
- 'testing.message.context.title',
421
- "A prominent button overlaying editor content where the message is displayed"
422
- )),
423
- },
424
- {
425
- key: 'testing/message/content',
426
- id: MenuId.TestMessageContent,
427
- description: ( localizeWithPath(
428
- 'vs/workbench/services/actions/common/menusExtensionPoint',
429
- 'testing.message.content.title',
430
- "Context menu for the message in the results tree"
431
- )),
432
- },
433
- {
434
- key: 'extension/context',
435
- id: MenuId.ExtensionContext,
436
- description: ( localizeWithPath(
437
- 'vs/workbench/services/actions/common/menusExtensionPoint',
438
- 'menus.extensionContext',
439
- "The extension context menu"
440
- ))
441
- },
442
- {
443
- key: 'timeline/title',
444
- id: MenuId.TimelineTitle,
445
- description: ( localizeWithPath(
446
- 'vs/workbench/services/actions/common/menusExtensionPoint',
447
- 'view.timelineTitle',
448
- "The Timeline view title menu"
449
- ))
450
- },
451
- {
452
- key: 'timeline/item/context',
453
- id: MenuId.TimelineItemContext,
454
- description: ( localizeWithPath(
455
- 'vs/workbench/services/actions/common/menusExtensionPoint',
456
- 'view.timelineContext',
457
- "The Timeline view item context menu"
458
- ))
459
- },
460
- {
461
- key: 'ports/item/context',
462
- id: MenuId.TunnelContext,
463
- description: ( localizeWithPath(
464
- 'vs/workbench/services/actions/common/menusExtensionPoint',
465
- 'view.tunnelContext',
466
- "The Ports view item context menu"
467
- ))
468
- },
469
- {
470
- key: 'ports/item/origin/inline',
471
- id: MenuId.TunnelOriginInline,
472
- description: ( localizeWithPath(
473
- 'vs/workbench/services/actions/common/menusExtensionPoint',
474
- 'view.tunnelOriginInline',
475
- "The Ports view item origin inline menu"
476
- ))
477
- },
478
- {
479
- key: 'ports/item/port/inline',
480
- id: MenuId.TunnelPortInline,
481
- description: ( localizeWithPath(
482
- 'vs/workbench/services/actions/common/menusExtensionPoint',
483
- 'view.tunnelPortInline',
484
- "The Ports view item port inline menu"
485
- ))
486
- },
487
- {
488
- key: 'file/newFile',
489
- id: MenuId.NewFile,
490
- description: ( localizeWithPath(
491
- 'vs/workbench/services/actions/common/menusExtensionPoint',
492
- 'file.newFile',
493
- "The 'New File...' quick pick, shown on welcome page and File menu."
494
- )),
495
- supportsSubmenus: false,
496
- },
497
- {
498
- key: 'webview/context',
499
- id: MenuId.WebviewContext,
500
- description: ( localizeWithPath(
501
- 'vs/workbench/services/actions/common/menusExtensionPoint',
502
- 'webview.context',
503
- "The webview context menu"
504
- ))
505
- },
506
- {
507
- key: 'file/share',
508
- id: MenuId.MenubarShare,
509
- description: ( localizeWithPath(
510
- 'vs/workbench/services/actions/common/menusExtensionPoint',
511
- 'menus.share',
512
- "Share submenu shown in the top level File menu."
513
- )),
514
- proposed: 'contribShareMenu'
515
- },
516
- {
517
- key: 'editor/inlineCompletions/actions',
518
- id: MenuId.InlineCompletionsActions,
519
- description: ( localizeWithPath(
520
- 'vs/workbench/services/actions/common/menusExtensionPoint',
521
- 'inlineCompletions.actions',
522
- "The actions shown when hovering on an inline completion"
523
- )),
524
- supportsSubmenus: false,
525
- proposed: 'inlineCompletionsAdditions'
526
- },
527
- {
528
- key: 'editor/content',
529
- id: MenuId.EditorContent,
530
- description: ( localizeWithPath(
531
- 'vs/workbench/services/actions/common/menusExtensionPoint',
532
- 'merge.toolbar',
533
- "The prominent button in an editor, overlays its content"
534
- )),
535
- proposed: 'contribEditorContentMenu'
536
- },
537
- {
538
- key: 'editor/lineNumber/context',
539
- id: MenuId.EditorLineNumberContext,
540
- description: ( localizeWithPath(
541
- 'vs/workbench/services/actions/common/menusExtensionPoint',
542
- 'editorLineNumberContext',
543
- "The contributed editor line number context menu"
544
- ))
545
- },
546
- {
547
- key: 'mergeEditor/result/title',
548
- id: MenuId.MergeInputResultToolbar,
549
- description: ( localizeWithPath(
550
- 'vs/workbench/services/actions/common/menusExtensionPoint',
551
- 'menus.mergeEditorResult',
552
- "The result toolbar of the merge editor"
553
- )),
554
- proposed: 'contribMergeEditorMenus'
555
- },
556
- ];
557
- var schema;
558
- ( (function(schema) {
559
- function isMenuItem(item) {
560
- return typeof item.command === 'string';
561
- }
562
- schema.isMenuItem = isMenuItem;
563
- function isValidMenuItem(item, collector) {
564
- if (typeof item.command !== 'string') {
565
- collector.error(( localizeWithPath(
566
- 'vs/workbench/services/actions/common/menusExtensionPoint',
567
- 'requirestring',
568
- "property `{0}` is mandatory and must be of type `string`",
569
- 'command'
570
- )));
571
- return false;
572
- }
573
- if (item.alt && typeof item.alt !== 'string') {
574
- collector.error(( localizeWithPath(
575
- 'vs/workbench/services/actions/common/menusExtensionPoint',
576
- 'optstring',
577
- "property `{0}` can be omitted or must be of type `string`",
578
- 'alt'
579
- )));
580
- return false;
581
- }
582
- if (item.when && typeof item.when !== 'string') {
583
- collector.error(( localizeWithPath(
584
- 'vs/workbench/services/actions/common/menusExtensionPoint',
585
- 'optstring',
586
- "property `{0}` can be omitted or must be of type `string`",
587
- 'when'
588
- )));
589
- return false;
590
- }
591
- if (item.group && typeof item.group !== 'string') {
592
- collector.error(( localizeWithPath(
593
- 'vs/workbench/services/actions/common/menusExtensionPoint',
594
- 'optstring',
595
- "property `{0}` can be omitted or must be of type `string`",
596
- 'group'
597
- )));
598
- return false;
599
- }
600
- return true;
601
- }
602
- schema.isValidMenuItem = isValidMenuItem;
603
- function isValidSubmenuItem(item, collector) {
604
- if (typeof item.submenu !== 'string') {
605
- collector.error(( localizeWithPath(
606
- 'vs/workbench/services/actions/common/menusExtensionPoint',
607
- 'requirestring',
608
- "property `{0}` is mandatory and must be of type `string`",
609
- 'submenu'
610
- )));
611
- return false;
612
- }
613
- if (item.when && typeof item.when !== 'string') {
614
- collector.error(( localizeWithPath(
615
- 'vs/workbench/services/actions/common/menusExtensionPoint',
616
- 'optstring',
617
- "property `{0}` can be omitted or must be of type `string`",
618
- 'when'
619
- )));
620
- return false;
621
- }
622
- if (item.group && typeof item.group !== 'string') {
623
- collector.error(( localizeWithPath(
624
- 'vs/workbench/services/actions/common/menusExtensionPoint',
625
- 'optstring',
626
- "property `{0}` can be omitted or must be of type `string`",
627
- 'group'
628
- )));
629
- return false;
630
- }
631
- return true;
632
- }
633
- schema.isValidSubmenuItem = isValidSubmenuItem;
634
- function isValidItems(items, collector) {
635
- if (!Array.isArray(items)) {
636
- collector.error(( localizeWithPath(
637
- 'vs/workbench/services/actions/common/menusExtensionPoint',
638
- 'requirearray',
639
- "submenu items must be an array"
640
- )));
641
- return false;
642
- }
643
- for (const item of items) {
644
- if (isMenuItem(item)) {
645
- if (!isValidMenuItem(item, collector)) {
646
- return false;
647
- }
648
- }
649
- else {
650
- if (!isValidSubmenuItem(item, collector)) {
651
- return false;
652
- }
653
- }
654
- }
655
- return true;
656
- }
657
- schema.isValidItems = isValidItems;
658
- function isValidSubmenu(submenu, collector) {
659
- if (typeof submenu !== 'object') {
660
- collector.error(( localizeWithPath(
661
- 'vs/workbench/services/actions/common/menusExtensionPoint',
662
- 'require',
663
- "submenu items must be an object"
664
- )));
665
- return false;
666
- }
667
- if (typeof submenu.id !== 'string') {
668
- collector.error(( localizeWithPath(
669
- 'vs/workbench/services/actions/common/menusExtensionPoint',
670
- 'requirestring',
671
- "property `{0}` is mandatory and must be of type `string`",
672
- 'id'
673
- )));
674
- return false;
675
- }
676
- if (typeof submenu.label !== 'string') {
677
- collector.error(( localizeWithPath(
678
- 'vs/workbench/services/actions/common/menusExtensionPoint',
679
- 'requirestring',
680
- "property `{0}` is mandatory and must be of type `string`",
681
- 'label'
682
- )));
683
- return false;
684
- }
685
- return true;
686
- }
687
- schema.isValidSubmenu = isValidSubmenu;
688
- const menuItem = {
689
- type: 'object',
690
- required: ['command'],
691
- properties: {
692
- command: {
693
- description: ( localizeWithPath(
694
- 'vs/workbench/services/actions/common/menusExtensionPoint',
695
- 'vscode.extension.contributes.menuItem.command',
696
- 'Identifier of the command to execute. The command must be declared in the \'commands\'-section'
697
- )),
698
- type: 'string'
699
- },
700
- alt: {
701
- description: ( localizeWithPath(
702
- 'vs/workbench/services/actions/common/menusExtensionPoint',
703
- 'vscode.extension.contributes.menuItem.alt',
704
- 'Identifier of an alternative command to execute. The command must be declared in the \'commands\'-section'
705
- )),
706
- type: 'string'
707
- },
708
- when: {
709
- description: ( localizeWithPath(
710
- 'vs/workbench/services/actions/common/menusExtensionPoint',
711
- 'vscode.extension.contributes.menuItem.when',
712
- 'Condition which must be true to show this item'
713
- )),
714
- type: 'string'
715
- },
716
- group: {
717
- description: ( localizeWithPath(
718
- 'vs/workbench/services/actions/common/menusExtensionPoint',
719
- 'vscode.extension.contributes.menuItem.group',
720
- 'Group into which this item belongs'
721
- )),
722
- type: 'string'
723
- }
724
- }
725
- };
726
- const submenuItem = {
727
- type: 'object',
728
- required: ['submenu'],
729
- properties: {
730
- submenu: {
731
- description: ( localizeWithPath(
732
- 'vs/workbench/services/actions/common/menusExtensionPoint',
733
- 'vscode.extension.contributes.menuItem.submenu',
734
- 'Identifier of the submenu to display in this item.'
735
- )),
736
- type: 'string'
737
- },
738
- when: {
739
- description: ( localizeWithPath(
740
- 'vs/workbench/services/actions/common/menusExtensionPoint',
741
- 'vscode.extension.contributes.menuItem.when',
742
- 'Condition which must be true to show this item'
743
- )),
744
- type: 'string'
745
- },
746
- group: {
747
- description: ( localizeWithPath(
748
- 'vs/workbench/services/actions/common/menusExtensionPoint',
749
- 'vscode.extension.contributes.menuItem.group',
750
- 'Group into which this item belongs'
751
- )),
752
- type: 'string'
753
- }
754
- }
755
- };
756
- const submenu = {
757
- type: 'object',
758
- required: ['id', 'label'],
759
- properties: {
760
- id: {
761
- description: ( localizeWithPath(
762
- 'vs/workbench/services/actions/common/menusExtensionPoint',
763
- 'vscode.extension.contributes.submenu.id',
764
- 'Identifier of the menu to display as a submenu.'
765
- )),
766
- type: 'string'
767
- },
768
- label: {
769
- description: ( localizeWithPath(
770
- 'vs/workbench/services/actions/common/menusExtensionPoint',
771
- 'vscode.extension.contributes.submenu.label',
772
- 'The label of the menu item which leads to this submenu.'
773
- )),
774
- type: 'string'
775
- },
776
- icon: {
777
- description: ( localizeWithPath(
778
- 'vs/workbench/services/actions/common/menusExtensionPoint',
779
- { key: 'vscode.extension.contributes.submenu.icon', comment: ['do not translate or change `\\$(zap)`, \\ in front of $ is important.'] },
780
- '(Optional) Icon which is used to represent the submenu in the UI. Either a file path, an object with file paths for dark and light themes, or a theme icon references, like `\\$(zap)`'
781
- )),
782
- anyOf: [{
783
- type: 'string'
784
- },
785
- {
786
- type: 'object',
787
- properties: {
788
- light: {
789
- description: ( localizeWithPath(
790
- 'vs/workbench/services/actions/common/menusExtensionPoint',
791
- 'vscode.extension.contributes.submenu.icon.light',
792
- 'Icon path when a light theme is used'
793
- )),
794
- type: 'string'
795
- },
796
- dark: {
797
- description: ( localizeWithPath(
798
- 'vs/workbench/services/actions/common/menusExtensionPoint',
799
- 'vscode.extension.contributes.submenu.icon.dark',
800
- 'Icon path when a dark theme is used'
801
- )),
802
- type: 'string'
803
- }
804
- }
805
- }]
806
- }
807
- }
808
- };
809
- schema.menusContribution = {
810
- description: ( localizeWithPath(
811
- 'vs/workbench/services/actions/common/menusExtensionPoint',
812
- 'vscode.extension.contributes.menus',
813
- "Contributes menu items to the editor"
814
- )),
815
- type: 'object',
816
- properties: index(apiMenus, menu => menu.key, menu => ({
817
- markdownDescription: menu.proposed ? ( localizeWithPath(
818
- 'vs/workbench/services/actions/common/menusExtensionPoint',
819
- 'proposed',
820
- "Proposed API, requires `enabledApiProposal: [\"{0}\"]` - {1}",
821
- menu.proposed,
822
- menu.description
823
- )) : menu.description,
824
- type: 'array',
825
- items: menu.supportsSubmenus === false ? menuItem : { oneOf: [menuItem, submenuItem] }
826
- })),
827
- additionalProperties: {
828
- description: 'Submenu',
829
- type: 'array',
830
- items: { oneOf: [menuItem, submenuItem] }
831
- }
832
- };
833
- schema.submenusContribution = {
834
- description: ( localizeWithPath(
835
- 'vs/workbench/services/actions/common/menusExtensionPoint',
836
- 'vscode.extension.contributes.submenus',
837
- "Contributes submenu items to the editor"
838
- )),
839
- type: 'array',
840
- items: submenu
841
- };
842
- function isValidCommand(command, collector) {
843
- if (!command) {
844
- collector.error(( localizeWithPath(
845
- 'vs/workbench/services/actions/common/menusExtensionPoint',
846
- 'nonempty',
847
- "expected non-empty value."
848
- )));
849
- return false;
850
- }
851
- if (isFalsyOrWhitespace(command.command)) {
852
- collector.error(( localizeWithPath(
853
- 'vs/workbench/services/actions/common/menusExtensionPoint',
854
- 'requirestring',
855
- "property `{0}` is mandatory and must be of type `string`",
856
- 'command'
857
- )));
858
- return false;
859
- }
860
- if (!isValidLocalizedString(command.title, collector, 'title')) {
861
- return false;
862
- }
863
- if (command.shortTitle && !isValidLocalizedString(command.shortTitle, collector, 'shortTitle')) {
864
- return false;
865
- }
866
- if (command.enablement && typeof command.enablement !== 'string') {
867
- collector.error(( localizeWithPath(
868
- 'vs/workbench/services/actions/common/menusExtensionPoint',
869
- 'optstring',
870
- "property `{0}` can be omitted or must be of type `string`",
871
- 'precondition'
872
- )));
873
- return false;
874
- }
875
- if (command.category && !isValidLocalizedString(command.category, collector, 'category')) {
876
- return false;
877
- }
878
- if (!isValidIcon(command.icon, collector)) {
879
- return false;
880
- }
881
- return true;
882
- }
883
- schema.isValidCommand = isValidCommand;
884
- function isValidIcon(icon, collector) {
885
- if (typeof icon === 'undefined') {
886
- return true;
887
- }
888
- if (typeof icon === 'string') {
889
- return true;
890
- }
891
- else if (typeof icon.dark === 'string' && typeof icon.light === 'string') {
892
- return true;
893
- }
894
- collector.error(( localizeWithPath(
895
- 'vs/workbench/services/actions/common/menusExtensionPoint',
896
- 'opticon',
897
- "property `icon` can be omitted or must be either a string or a literal like `{dark, light}`"
898
- )));
899
- return false;
900
- }
901
- function isValidLocalizedString(localized, collector, propertyName) {
902
- if (typeof localized === 'undefined') {
903
- collector.error(( localizeWithPath(
904
- 'vs/workbench/services/actions/common/menusExtensionPoint',
905
- 'requireStringOrObject',
906
- "property `{0}` is mandatory and must be of type `string` or `object`",
907
- propertyName
908
- )));
909
- return false;
910
- }
911
- else if (typeof localized === 'string' && isFalsyOrWhitespace(localized)) {
912
- collector.error(( localizeWithPath(
913
- 'vs/workbench/services/actions/common/menusExtensionPoint',
914
- 'requirestring',
915
- "property `{0}` is mandatory and must be of type `string`",
916
- propertyName
917
- )));
918
- return false;
919
- }
920
- else if (typeof localized !== 'string' && (isFalsyOrWhitespace(localized.original) || isFalsyOrWhitespace(localized.value))) {
921
- collector.error(( localizeWithPath(
922
- 'vs/workbench/services/actions/common/menusExtensionPoint',
923
- 'requirestrings',
924
- "properties `{0}` and `{1}` are mandatory and must be of type `string`",
925
- `${propertyName}.value`,
926
- `${propertyName}.original`
927
- )));
928
- return false;
929
- }
930
- return true;
931
- }
932
- const commandType = {
933
- type: 'object',
934
- required: ['command', 'title'],
935
- properties: {
936
- command: {
937
- description: ( localizeWithPath(
938
- 'vs/workbench/services/actions/common/menusExtensionPoint',
939
- 'vscode.extension.contributes.commandType.command',
940
- 'Identifier of the command to execute'
941
- )),
942
- type: 'string'
943
- },
944
- title: {
945
- description: ( localizeWithPath(
946
- 'vs/workbench/services/actions/common/menusExtensionPoint',
947
- 'vscode.extension.contributes.commandType.title',
948
- 'Title by which the command is represented in the UI'
949
- )),
950
- type: 'string'
951
- },
952
- shortTitle: {
953
- markdownDescription: ( localizeWithPath(
954
- 'vs/workbench/services/actions/common/menusExtensionPoint',
955
- 'vscode.extension.contributes.commandType.shortTitle',
956
- '(Optional) Short title by which the command is represented in the UI. Menus pick either `title` or `shortTitle` depending on the context in which they show commands.'
957
- )),
958
- type: 'string'
959
- },
960
- category: {
961
- description: ( localizeWithPath(
962
- 'vs/workbench/services/actions/common/menusExtensionPoint',
963
- 'vscode.extension.contributes.commandType.category',
964
- '(Optional) Category string by which the command is grouped in the UI'
965
- )),
966
- type: 'string'
967
- },
968
- enablement: {
969
- description: ( localizeWithPath(
970
- 'vs/workbench/services/actions/common/menusExtensionPoint',
971
- 'vscode.extension.contributes.commandType.precondition',
972
- '(Optional) Condition which must be true to enable the command in the UI (menu and keybindings). Does not prevent executing the command by other means, like the `executeCommand`-api.'
973
- )),
974
- type: 'string'
975
- },
976
- icon: {
977
- description: ( localizeWithPath(
978
- 'vs/workbench/services/actions/common/menusExtensionPoint',
979
- { key: 'vscode.extension.contributes.commandType.icon', comment: ['do not translate or change `\\$(zap)`, \\ in front of $ is important.'] },
980
- '(Optional) Icon which is used to represent the command in the UI. Either a file path, an object with file paths for dark and light themes, or a theme icon references, like `\\$(zap)`'
981
- )),
982
- anyOf: [{
983
- type: 'string'
984
- },
985
- {
986
- type: 'object',
987
- properties: {
988
- light: {
989
- description: ( localizeWithPath(
990
- 'vs/workbench/services/actions/common/menusExtensionPoint',
991
- 'vscode.extension.contributes.commandType.icon.light',
992
- 'Icon path when a light theme is used'
993
- )),
994
- type: 'string'
995
- },
996
- dark: {
997
- description: ( localizeWithPath(
998
- 'vs/workbench/services/actions/common/menusExtensionPoint',
999
- 'vscode.extension.contributes.commandType.icon.dark',
1000
- 'Icon path when a dark theme is used'
1001
- )),
1002
- type: 'string'
1003
- }
1004
- }
1005
- }]
1006
- }
1007
- }
1008
- };
1009
- schema.commandsContribution = {
1010
- description: ( localizeWithPath(
1011
- 'vs/workbench/services/actions/common/menusExtensionPoint',
1012
- 'vscode.extension.contributes.commands',
1013
- "Contributes commands to the command palette."
1014
- )),
1015
- oneOf: [
1016
- commandType,
1017
- {
1018
- type: 'array',
1019
- items: commandType
1020
- }
1021
- ]
1022
- };
1023
- })(schema || (schema = {})));
1024
- const _commandRegistrations = ( new DisposableStore());
1025
- const commandsExtensionPoint = ( ExtensionsRegistry.registerExtensionPoint({
1026
- extensionPoint: 'commands',
1027
- jsonSchema: schema.commandsContribution,
1028
- activationEventsGenerator: (contribs, result) => {
1029
- for (const contrib of contribs) {
1030
- if (contrib.command) {
1031
- result.push(`onCommand:${contrib.command}`);
1032
- }
1033
- }
1034
- }
1035
- }));
1036
- commandsExtensionPoint.setHandler(extensions => {
1037
- function handleCommand(userFriendlyCommand, extension) {
1038
- if (!schema.isValidCommand(userFriendlyCommand, extension.collector)) {
1039
- return;
1040
- }
1041
- const { icon, enablement, category, title, shortTitle, command } = userFriendlyCommand;
1042
- let absoluteIcon;
1043
- if (icon) {
1044
- if (typeof icon === 'string') {
1045
- absoluteIcon = ThemeIcon.fromString(icon) ?? { dark: resources.joinPath(extension.description.extensionLocation, icon), light: resources.joinPath(extension.description.extensionLocation, icon) };
1046
- }
1047
- else {
1048
- absoluteIcon = {
1049
- dark: resources.joinPath(extension.description.extensionLocation, icon.dark),
1050
- light: resources.joinPath(extension.description.extensionLocation, icon.light)
1051
- };
1052
- }
1053
- }
1054
- const existingCmd = MenuRegistry.getCommand(command);
1055
- if (existingCmd) {
1056
- if (existingCmd.source) {
1057
- extension.collector.info(( localizeWithPath(
1058
- 'vs/workbench/services/actions/common/menusExtensionPoint',
1059
- 'dup1',
1060
- "Command `{0}` already registered by {1} ({2})",
1061
- userFriendlyCommand.command,
1062
- existingCmd.source.title,
1063
- existingCmd.source.id
1064
- )));
1065
- }
1066
- else {
1067
- extension.collector.info(( localizeWithPath(
1068
- 'vs/workbench/services/actions/common/menusExtensionPoint',
1069
- 'dup0',
1070
- "Command `{0}` already registered",
1071
- userFriendlyCommand.command
1072
- )));
1073
- }
1074
- }
1075
- _commandRegistrations.add(MenuRegistry.addCommand({
1076
- id: command,
1077
- title,
1078
- source: { id: extension.description.identifier.value, title: extension.description.displayName ?? extension.description.name },
1079
- shortTitle,
1080
- tooltip: title,
1081
- category,
1082
- precondition: ContextKeyExpr.deserialize(enablement),
1083
- icon: absoluteIcon
1084
- }));
1085
- }
1086
- _commandRegistrations.clear();
1087
- for (const extension of extensions) {
1088
- const { value } = extension;
1089
- if (Array.isArray(value)) {
1090
- for (const command of value) {
1091
- handleCommand(command, extension);
1092
- }
1093
- }
1094
- else {
1095
- handleCommand(value, extension);
1096
- }
1097
- }
1098
- });
1099
- const _submenus = ( new Map());
1100
- const submenusExtensionPoint = ( ExtensionsRegistry.registerExtensionPoint({
1101
- extensionPoint: 'submenus',
1102
- jsonSchema: schema.submenusContribution
1103
- }));
1104
- submenusExtensionPoint.setHandler(extensions => {
1105
- _submenus.clear();
1106
- for (const extension of extensions) {
1107
- const { value, collector } = extension;
1108
- for (const [, submenuInfo] of Object.entries(value)) {
1109
- if (!schema.isValidSubmenu(submenuInfo, collector)) {
1110
- continue;
1111
- }
1112
- if (!submenuInfo.id) {
1113
- collector.warn(( localizeWithPath(
1114
- 'vs/workbench/services/actions/common/menusExtensionPoint',
1115
- 'submenuId.invalid.id',
1116
- "`{0}` is not a valid submenu identifier",
1117
- submenuInfo.id
1118
- )));
1119
- continue;
1120
- }
1121
- if (( _submenus.has(submenuInfo.id))) {
1122
- collector.info(( localizeWithPath(
1123
- 'vs/workbench/services/actions/common/menusExtensionPoint',
1124
- 'submenuId.duplicate.id',
1125
- "The `{0}` submenu was already previously registered.",
1126
- submenuInfo.id
1127
- )));
1128
- continue;
1129
- }
1130
- if (!submenuInfo.label) {
1131
- collector.warn(( localizeWithPath(
1132
- 'vs/workbench/services/actions/common/menusExtensionPoint',
1133
- 'submenuId.invalid.label',
1134
- "`{0}` is not a valid submenu label",
1135
- submenuInfo.label
1136
- )));
1137
- continue;
1138
- }
1139
- let absoluteIcon;
1140
- if (submenuInfo.icon) {
1141
- if (typeof submenuInfo.icon === 'string') {
1142
- absoluteIcon = ThemeIcon.fromString(submenuInfo.icon) || { dark: resources.joinPath(extension.description.extensionLocation, submenuInfo.icon) };
1143
- }
1144
- else {
1145
- absoluteIcon = {
1146
- dark: resources.joinPath(extension.description.extensionLocation, submenuInfo.icon.dark),
1147
- light: resources.joinPath(extension.description.extensionLocation, submenuInfo.icon.light)
1148
- };
1149
- }
1150
- }
1151
- const item = {
1152
- id: MenuId.for(`api:${submenuInfo.id}`),
1153
- label: submenuInfo.label,
1154
- icon: absoluteIcon
1155
- };
1156
- _submenus.set(submenuInfo.id, item);
1157
- }
1158
- }
1159
- });
1160
- const _apiMenusByKey = ( new Map(( apiMenus.map(menu => ([menu.key, menu])))));
1161
- const _menuRegistrations = ( new DisposableStore());
1162
- const _submenuMenuItems = ( new Map());
1163
- const menusExtensionPoint = ( ExtensionsRegistry.registerExtensionPoint({
1164
- extensionPoint: 'menus',
1165
- jsonSchema: schema.menusContribution,
1166
- deps: [submenusExtensionPoint]
1167
- }));
1168
- menusExtensionPoint.setHandler(extensions => {
1169
- _menuRegistrations.clear();
1170
- _submenuMenuItems.clear();
1171
- for (const extension of extensions) {
1172
- const { value, collector } = extension;
1173
- for (const entry of Object.entries(value)) {
1174
- if (!schema.isValidItems(entry[1], collector)) {
1175
- continue;
1176
- }
1177
- let menu = _apiMenusByKey.get(entry[0]);
1178
- if (!menu) {
1179
- const submenu = _submenus.get(entry[0]);
1180
- if (submenu) {
1181
- menu = {
1182
- key: entry[0],
1183
- id: submenu.id,
1184
- description: ''
1185
- };
1186
- }
1187
- }
1188
- if (!menu) {
1189
- continue;
1190
- }
1191
- if (menu.proposed && !isProposedApiEnabled(extension.description, menu.proposed)) {
1192
- collector.error(( localizeWithPath(
1193
- 'vs/workbench/services/actions/common/menusExtensionPoint',
1194
- 'proposedAPI.invalid',
1195
- "{0} is a proposed menu identifier. It requires 'package.json#enabledApiProposals: [\"{1}\"]' and is only available when running out of dev or with the following command line switch: --enable-proposed-api {2}",
1196
- entry[0],
1197
- menu.proposed,
1198
- extension.description.identifier.value
1199
- )));
1200
- continue;
1201
- }
1202
- for (const menuItem of entry[1]) {
1203
- let item;
1204
- if (schema.isMenuItem(menuItem)) {
1205
- const command = MenuRegistry.getCommand(menuItem.command);
1206
- const alt = menuItem.alt && MenuRegistry.getCommand(menuItem.alt) || undefined;
1207
- if (!command) {
1208
- collector.error(( localizeWithPath(
1209
- 'vs/workbench/services/actions/common/menusExtensionPoint',
1210
- 'missing.command',
1211
- "Menu item references a command `{0}` which is not defined in the 'commands' section.",
1212
- menuItem.command
1213
- )));
1214
- continue;
1215
- }
1216
- if (menuItem.alt && !alt) {
1217
- collector.warn(( localizeWithPath(
1218
- 'vs/workbench/services/actions/common/menusExtensionPoint',
1219
- 'missing.altCommand',
1220
- "Menu item references an alt-command `{0}` which is not defined in the 'commands' section.",
1221
- menuItem.alt
1222
- )));
1223
- }
1224
- if (menuItem.command === menuItem.alt) {
1225
- collector.info(( localizeWithPath(
1226
- 'vs/workbench/services/actions/common/menusExtensionPoint',
1227
- 'dupe.command',
1228
- "Menu item references the same command as default and alt-command"
1229
- )));
1230
- }
1231
- item = { command, alt, group: undefined, order: undefined, when: undefined };
1232
- }
1233
- else {
1234
- if (menu.supportsSubmenus === false) {
1235
- collector.error(( localizeWithPath(
1236
- 'vs/workbench/services/actions/common/menusExtensionPoint',
1237
- 'unsupported.submenureference',
1238
- "Menu item references a submenu for a menu which doesn't have submenu support."
1239
- )));
1240
- continue;
1241
- }
1242
- const submenu = _submenus.get(menuItem.submenu);
1243
- if (!submenu) {
1244
- collector.error(( localizeWithPath(
1245
- 'vs/workbench/services/actions/common/menusExtensionPoint',
1246
- 'missing.submenu',
1247
- "Menu item references a submenu `{0}` which is not defined in the 'submenus' section.",
1248
- menuItem.submenu
1249
- )));
1250
- continue;
1251
- }
1252
- let submenuRegistrations = _submenuMenuItems.get(menu.id.id);
1253
- if (!submenuRegistrations) {
1254
- submenuRegistrations = ( new Set());
1255
- _submenuMenuItems.set(menu.id.id, submenuRegistrations);
1256
- }
1257
- if (( submenuRegistrations.has(submenu.id.id))) {
1258
- collector.warn(( localizeWithPath(
1259
- 'vs/workbench/services/actions/common/menusExtensionPoint',
1260
- 'submenuItem.duplicate',
1261
- "The `{0}` submenu was already contributed to the `{1}` menu.",
1262
- menuItem.submenu,
1263
- entry[0]
1264
- )));
1265
- continue;
1266
- }
1267
- submenuRegistrations.add(submenu.id.id);
1268
- item = { submenu: submenu.id, icon: submenu.icon, title: submenu.label, group: undefined, order: undefined, when: undefined };
1269
- }
1270
- if (menuItem.group) {
1271
- const idx = menuItem.group.lastIndexOf('@');
1272
- if (idx > 0) {
1273
- item.group = menuItem.group.substr(0, idx);
1274
- item.order = Number(menuItem.group.substr(idx + 1)) || undefined;
1275
- }
1276
- else {
1277
- item.group = menuItem.group;
1278
- }
1279
- }
1280
- item.when = ContextKeyExpr.deserialize(menuItem.when);
1281
- _menuRegistrations.add(MenuRegistry.appendMenuItem(menu.id, item));
1282
- }
1283
- }
1284
- }
1285
- });
1286
- export { commandsExtensionPoint };