@codingame/monaco-vscode-api 1.85.0-next.2 → 1.85.1

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 (239) hide show
  1. package/README.md +19 -10
  2. package/contributions.js +1 -0
  3. package/missing-services.js +91 -5
  4. package/monaco-editor-treemending.patch +2540 -2533
  5. package/package.json +6 -6
  6. package/vscode/src/vs/base/common/jsonFormatter.js +8 -1
  7. package/vscode/src/vs/platform/actions/browser/buttonbar.js +128 -0
  8. package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +2 -1
  9. package/vscode/src/vs/platform/layout/browser/zIndexRegistry.js +58 -0
  10. package/vscode/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.js +56 -1
  11. package/vscode/src/vs/workbench/browser/actions/layoutActions.js +186 -4
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +191 -0
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +238 -2
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +75 -0
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +205 -1
  16. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorInput.js +168 -0
  17. package/vscode/src/vs/workbench/contrib/chat/browser/chatFollowups.js +35 -0
  18. package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +340 -0
  19. package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +1195 -0
  20. package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +115 -0
  21. package/vscode/src/vs/workbench/contrib/chat/browser/chatOptions.js +81 -0
  22. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommandContentWidget.css.js +4 -0
  23. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommandContentWidget.js +62 -0
  24. package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +583 -0
  25. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.css.js +4 -0
  26. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.js +290 -0
  27. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables.js +167 -0
  28. package/vscode/src/vs/workbench/contrib/chat/browser/media/chat.css.js +4 -0
  29. package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +6 -1
  30. package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +562 -0
  31. package/vscode/src/vs/workbench/contrib/chat/common/chatParserTypes.js +31 -1
  32. package/vscode/src/vs/workbench/contrib/chat/common/chatProvider.js +24 -1
  33. package/vscode/src/vs/workbench/contrib/chat/common/chatRequestParser.js +193 -0
  34. package/vscode/src/vs/workbench/contrib/chat/common/chatService.js +22 -1
  35. package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +52 -1
  36. package/vscode/src/vs/workbench/contrib/chat/common/chatViewModel.js +258 -0
  37. package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.js +37 -0
  38. package/vscode/src/vs/workbench/contrib/chat/common/chatWordCounter.js +25 -0
  39. package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.css.js +4 -0
  40. package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +388 -0
  41. package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +61 -0
  42. package/vscode/src/vs/workbench/contrib/comments/browser/commentFormActions.js +49 -0
  43. package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +647 -0
  44. package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +300 -0
  45. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadAdditionalActions.js +60 -0
  46. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +249 -0
  47. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +107 -0
  48. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +333 -0
  49. package/vscode/src/vs/workbench/contrib/comments/browser/media/review.css.js +4 -0
  50. package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +99 -0
  51. package/vscode/src/vs/workbench/contrib/comments/browser/timestamp.js +55 -0
  52. package/vscode/src/vs/workbench/contrib/comments/common/commentsConfiguration.js +2 -0
  53. package/vscode/src/vs/workbench/contrib/contextmenu/browser/contextmenu.contribution.js +20 -0
  54. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +855 -0
  55. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +410 -0
  56. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +1591 -0
  57. package/vscode/src/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +178 -0
  58. package/vscode/src/vs/workbench/contrib/debug/browser/media/breakpointWidget.css.js +4 -0
  59. package/vscode/src/vs/workbench/contrib/debug/browser/media/callStackEditorContribution.css.js +4 -0
  60. package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +1485 -0
  61. package/vscode/src/vs/workbench/contrib/debug/common/debugSource.js +125 -0
  62. package/vscode/src/vs/workbench/contrib/debug/common/disassemblyViewInput.js +29 -0
  63. package/vscode/src/vs/workbench/contrib/extensions/common/extensionsInput.js +41 -0
  64. package/vscode/src/vs/workbench/contrib/extensions/common/extensionsUtils.js +102 -0
  65. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.css.js +4 -0
  66. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +988 -0
  67. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatLivePreviewWidget.js +431 -0
  68. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +417 -0
  69. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +806 -0
  70. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +915 -0
  71. package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +19 -0
  72. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +129 -10
  73. package/vscode/src/vs/workbench/contrib/markdown/browser/markdownDocumentRenderer.js +205 -0
  74. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +150 -0
  75. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +480 -0
  76. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController.js +5 -0
  77. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/diffComputer.js +90 -0
  78. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/editing.js +54 -0
  79. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/lineRange.js +108 -0
  80. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mapping.js +258 -0
  81. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +614 -0
  82. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange.js +307 -0
  83. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/rangeUtils.js +44 -0
  84. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +165 -0
  85. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/telemetry.js +78 -0
  86. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/utils.js +169 -0
  87. package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +64 -0
  88. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/cellOutputClipboard.js +49 -0
  89. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findFilters.js +70 -0
  90. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js +120 -0
  91. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findModel.js +416 -0
  92. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.css.js +4 -0
  93. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +663 -0
  94. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +593 -0
  95. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +72 -0
  96. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.js +326 -0
  97. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +539 -0
  98. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.js +265 -0
  99. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +348 -0
  100. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebook.css.js +4 -0
  101. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellChat.css.js +4 -0
  102. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellEditorHint.css.js +4 -0
  103. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellInsertToolbar.css.js +4 -0
  104. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellOutput.css.js +4 -0
  105. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellStatusBar.css.js +4 -0
  106. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellTitleToolbar.css.js +4 -0
  107. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookDnd.css.js +4 -0
  108. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookEditorStickyScroll.css.js +4 -0
  109. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFocusIndicator.css.js +4 -0
  110. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFolding.css.js +4 -0
  111. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookKernelActionViewItem.css.js +4 -0
  112. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookOutline.css.js +4 -0
  113. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookToolbar.css.js +4 -0
  114. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookBrowser.js +95 -3
  115. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +437 -0
  116. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorExtensions.js +29 -0
  117. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +2730 -0
  118. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.js +139 -0
  119. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookLogger.js +17 -0
  120. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.js +564 -0
  121. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookViewEvents.js +27 -0
  122. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellPart.js +119 -0
  123. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.js +27 -0
  124. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.js +135 -0
  125. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.js +178 -0
  126. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDecorations.js +35 -0
  127. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.js +377 -0
  128. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDragRenderer.js +97 -0
  129. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +194 -0
  130. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellExecution.js +71 -0
  131. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocus.js +20 -0
  132. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocusIndicator.js +85 -0
  133. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.js +652 -0
  134. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellProgressBar.js +59 -0
  135. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.js +303 -0
  136. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbarStickyScroll.js +24 -0
  137. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.js +228 -0
  138. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatActions.js +302 -0
  139. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatController.js +438 -0
  140. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatPart.js +45 -0
  141. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +435 -0
  142. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.js +95 -0
  143. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.js +107 -0
  144. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellInput.js +29 -0
  145. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput.js +59 -0
  146. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.js +67 -0
  147. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.js +430 -0
  148. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellAnchor.js +54 -0
  149. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.js +1131 -0
  150. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellListView.js +21 -0
  151. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +1591 -0
  152. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.js +341 -0
  153. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.js +2155 -0
  154. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewThemeMapping.js +65 -0
  155. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/OutlineEntry.js +95 -0
  156. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.js +507 -0
  157. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellEditorOptions.js +85 -0
  158. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputViewModel.js +47 -0
  159. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellSelectionCollection.js +40 -0
  160. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.js +435 -0
  161. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/eventDispatcher.js +31 -0
  162. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/foldingModel.js +257 -0
  163. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel.js +239 -0
  164. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +103 -0
  165. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineProvider.js +211 -0
  166. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.js +808 -0
  167. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/viewContext.js +8 -0
  168. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +381 -0
  169. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.js +527 -0
  170. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorWidgetContextKeys.js +163 -0
  171. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.js +651 -0
  172. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.js +173 -0
  173. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookOverviewRuler.js +98 -0
  174. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.js +62 -0
  175. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellOutputTextModel.js +101 -0
  176. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.js +346 -0
  177. package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +152 -1
  178. package/vscode/src/vs/workbench/contrib/notebook/common/notebookContextKeys.js +39 -0
  179. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.js +296 -0
  180. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +261 -0
  181. package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionService.js +3 -1
  182. package/vscode/src/vs/workbench/contrib/notebook/common/notebookKernelService.js +2 -1
  183. package/vscode/src/vs/workbench/contrib/notebook/common/notebookKeymapService.js +3 -0
  184. package/vscode/src/vs/workbench/contrib/notebook/common/notebookLoggingService.js +3 -0
  185. package/vscode/src/vs/workbench/contrib/notebook/common/notebookPerformance.js +16 -0
  186. package/vscode/src/vs/workbench/contrib/notebook/common/notebookRange.js +66 -0
  187. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookWorkerService.js +4 -0
  188. package/vscode/src/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +130 -0
  189. package/vscode/src/vs/workbench/contrib/remote/browser/media/tunnelView.css.js +4 -0
  190. package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +847 -0
  191. package/vscode/src/vs/workbench/contrib/remote/browser/remoteIcons.js +89 -0
  192. package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +1942 -0
  193. package/vscode/src/vs/workbench/contrib/remote/browser/urlFinder.js +107 -0
  194. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsBase.js +49 -0
  195. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsFind.js +387 -0
  196. package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +2 -2
  197. package/vscode/src/vs/workbench/contrib/search/common/constants.js +66 -0
  198. package/vscode/src/vs/workbench/contrib/searchEditor/browser/constants.js +11 -0
  199. package/vscode/src/vs/workbench/contrib/snippets/browser/commands/abstractSnippetsActions.js +24 -0
  200. package/vscode/src/vs/workbench/contrib/snippets/browser/commands/fileTemplateSnippets.js +95 -0
  201. package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.js +4 -1
  202. package/vscode/src/vs/workbench/contrib/terminal/common/terminal.js +2 -1
  203. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/featuredExtensionService.js +159 -0
  204. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedExtensionPoint.js +375 -0
  205. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.js +563 -0
  206. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.js +932 -0
  207. package/vscode/src/vs/workbench/services/layout/browser/layoutService.js +15 -1
  208. package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.d.ts +2 -2
  209. package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.js +190 -2
  210. package/vscode/src/vs/workbench/services/workingCopy/common/resourceWorkingCopy.js +77 -0
  211. package/assets/break.mp3 +0 -0
  212. package/assets/chatRequestSent.mp3 +0 -0
  213. package/assets/chatResponsePending.mp3 +0 -0
  214. package/assets/chatResponseReceived1.mp3 +0 -0
  215. package/assets/chatResponseReceived2.mp3 +0 -0
  216. package/assets/chatResponseReceived3.mp3 +0 -0
  217. package/assets/chatResponseReceived4.mp3 +0 -0
  218. package/assets/clear.mp3 +0 -0
  219. package/assets/defaultIcon.png +0 -0
  220. package/assets/diffLineDeleted.mp3 +0 -0
  221. package/assets/diffLineInserted.mp3 +0 -0
  222. package/assets/diffLineModified.mp3 +0 -0
  223. package/assets/error.mp3 +0 -0
  224. package/assets/fake.html +0 -10
  225. package/assets/foldedAreas.mp3 +0 -0
  226. package/assets/format.mp3 +0 -0
  227. package/assets/index-no-csp.html +0 -1226
  228. package/assets/index.html +0 -1227
  229. package/assets/quickFixes.mp3 +0 -0
  230. package/assets/save.mp3 +0 -0
  231. package/assets/service-worker.js +0 -457
  232. package/assets/taskCompleted.mp3 +0 -0
  233. package/assets/taskFailed.mp3 +0 -0
  234. package/assets/terminalBell.mp3 +0 -0
  235. package/assets/warning.mp3 +0 -0
  236. package/assets/webWorkerExtensionHostIframe.html +0 -123
  237. package/override/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js +0 -2
  238. package/override/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +0 -2
  239. package/override/vs/workbench/contrib/notebook/common/notebookEditorInput.js +0 -5
@@ -0,0 +1,1591 @@
1
+ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
+ import * as dom from 'monaco-editor/esm/vs/base/browser/dom.js';
3
+ import { Gesture } from 'monaco-editor/esm/vs/base/browser/touch.js';
4
+ import { ActionBar } from 'monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js';
5
+ import { IconLabel } from 'monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabel.js';
6
+ import { InputBox } from 'monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.js';
7
+ import { Action } from 'monaco-editor/esm/vs/base/common/actions.js';
8
+ import { equals } from 'monaco-editor/esm/vs/base/common/arrays.js';
9
+ import { RunOnceScheduler } from 'monaco-editor/esm/vs/base/common/async.js';
10
+ import { Codicon } from 'monaco-editor/esm/vs/base/common/codicons.js';
11
+ import { MarkdownString } from 'monaco-editor/esm/vs/base/common/htmlContent.js';
12
+ import { dispose } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
13
+ import * as resources from 'monaco-editor/esm/vs/base/common/resources.js';
14
+ import { isCodeEditor } from 'monaco-editor/esm/vs/editor/browser/editorBrowser.js';
15
+ import { ILanguageService } from 'monaco-editor/esm/vs/editor/common/languages/language.js';
16
+ import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
17
+ import { createAndFillInActionBarActions, createAndFillInContextMenuActions } from 'monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.js';
18
+ import { registerAction2, Action2, MenuId, IMenuService } from 'monaco-editor/esm/vs/platform/actions/common/actions.js';
19
+ import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
20
+ import { ContextKeyExpr, IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
21
+ import { IContextMenuService, IContextViewService } from 'monaco-editor/esm/vs/platform/contextview/browser/contextView.js';
22
+ import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
23
+ import { IKeybindingService } from 'monaco-editor/esm/vs/platform/keybinding/common/keybinding.js';
24
+ import { ILabelService } from 'monaco-editor/esm/vs/platform/label/common/label.js';
25
+ import { WorkbenchList } from 'monaco-editor/esm/vs/platform/list/browser/listService.js';
26
+ import { IOpenerService } from 'monaco-editor/esm/vs/platform/opener/common/opener.js';
27
+ import { ITelemetryService } from 'monaco-editor/esm/vs/platform/telemetry/common/telemetry.js';
28
+ import { defaultInputBoxStyles } from 'monaco-editor/esm/vs/platform/theme/browser/defaultStyles.js';
29
+ import { IThemeService } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
30
+ import { ThemeIcon } from 'monaco-editor/esm/vs/base/common/themables.js';
31
+ import { ViewAction, ViewPane } from '../../../browser/parts/views/viewPane.js';
32
+ import { IViewDescriptorService } from '../../../common/views.js';
33
+ import { debugBreakpointUnsupported, logBreakpoint, conditionalBreakpoint, watchExpressionsAddFuncBreakpoint, breakpointsActivate, breakpointsRemoveAll, dataBreakpoint, functionBreakpoint, breakpoint } from './debugIcons.js';
34
+ import { BREAKPOINTS_VIEW_ID, CONTEXT_DEBUGGERS_AVAILABLE, IDebugService, CONTEXT_BREAKPOINT_ITEM_TYPE, CONTEXT_BREAKPOINTS_EXIST, CONTEXT_IN_DEBUG_MODE, CONTEXT_BREAKPOINT_SUPPORTS_CONDITION, BREAKPOINT_EDITOR_CONTRIBUTION_ID, CONTEXT_BREAKPOINT_INPUT_FOCUSED, CONTEXT_BREAKPOINTS_FOCUSED, DEBUG_SCHEME, DebuggerString } from '../common/debug.js';
35
+ import { DataBreakpoint, FunctionBreakpoint, InstructionBreakpoint, Breakpoint, ExceptionBreakpoint } from '../common/debugModel.js';
36
+ import { DisassemblyViewInput } from '../common/disassemblyViewInput.js';
37
+ import { IEditorService, SIDE_GROUP, ACTIVE_GROUP } from '../../../services/editor/common/editorService.js';
38
+ import { IHoverService } from '../../../services/hover/browser/hover.js';
39
+ var BreakpointsRenderer_1, FunctionBreakpointsRenderer_1, DataBreakpointsRenderer_1, InstructionBreakpointsRenderer_1;
40
+ const $ = dom.$;
41
+ function createCheckbox(disposables) {
42
+ const checkbox = $('input');
43
+ checkbox.type = 'checkbox';
44
+ checkbox.tabIndex = -1;
45
+ disposables.push(Gesture.ignoreTarget(checkbox));
46
+ return checkbox;
47
+ }
48
+ const MAX_VISIBLE_BREAKPOINTS = 9;
49
+ function getExpandedBodySize(model, sessionId, countLimit) {
50
+ const length = model.getBreakpoints().length + model.getExceptionBreakpointsForSession(sessionId).length + model.getFunctionBreakpoints().length + model.getDataBreakpoints().length + model.getInstructionBreakpoints().length;
51
+ return Math.min(countLimit, length) * 22;
52
+ }
53
+ let BreakpointsView = class BreakpointsView extends ViewPane {
54
+ constructor(options, contextMenuService, debugService, keybindingService, instantiationService, themeService, editorService, contextViewService, configurationService, viewDescriptorService, contextKeyService, openerService, telemetryService, labelService, menuService, hoverService, languageService) {
55
+ super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
56
+ this.debugService = debugService;
57
+ this.editorService = editorService;
58
+ this.contextViewService = contextViewService;
59
+ this.labelService = labelService;
60
+ this.hoverService = hoverService;
61
+ this.languageService = languageService;
62
+ this.needsRefresh = false;
63
+ this.needsStateChange = false;
64
+ this.ignoreLayout = false;
65
+ this.autoFocusedIndex = -1;
66
+ this.menu = menuService.createMenu(MenuId.DebugBreakpointsContext, contextKeyService);
67
+ this._register(this.menu);
68
+ this.breakpointItemType = CONTEXT_BREAKPOINT_ITEM_TYPE.bindTo(contextKeyService);
69
+ this.breakpointSupportsCondition = CONTEXT_BREAKPOINT_SUPPORTS_CONDITION.bindTo(contextKeyService);
70
+ this.breakpointInputFocused = CONTEXT_BREAKPOINT_INPUT_FOCUSED.bindTo(contextKeyService);
71
+ this._register(this.debugService.getModel().onDidChangeBreakpoints(() => this.onBreakpointsChange()));
72
+ this._register(this.debugService.getViewModel().onDidFocusSession(() => this.onBreakpointsChange()));
73
+ this._register(this.debugService.onDidChangeState(() => this.onStateChange()));
74
+ this.hintDelayer = this._register(( new RunOnceScheduler(() => this.updateBreakpointsHint(true), 4000)));
75
+ }
76
+ renderBody(container) {
77
+ super.renderBody(container);
78
+ this.element.classList.add('debug-pane');
79
+ container.classList.add('debug-breakpoints');
80
+ const delegate = ( new BreakpointsDelegate(this));
81
+ this.list = this.instantiationService.createInstance(WorkbenchList, 'Breakpoints', container, delegate, [
82
+ this.instantiationService.createInstance(BreakpointsRenderer, this.menu, this.breakpointSupportsCondition, this.breakpointItemType),
83
+ ( new ExceptionBreakpointsRenderer(
84
+ this.menu,
85
+ this.breakpointSupportsCondition,
86
+ this.breakpointItemType,
87
+ this.debugService
88
+ )),
89
+ ( new ExceptionBreakpointInputRenderer(this, this.debugService, this.contextViewService)),
90
+ this.instantiationService.createInstance(FunctionBreakpointsRenderer, this.menu, this.breakpointSupportsCondition, this.breakpointItemType),
91
+ ( new FunctionBreakpointInputRenderer(this, this.debugService, this.contextViewService, this.labelService)),
92
+ this.instantiationService.createInstance(DataBreakpointsRenderer, this.menu, this.breakpointSupportsCondition, this.breakpointItemType),
93
+ ( new DataBreakpointInputRenderer(this, this.debugService, this.contextViewService, this.labelService)),
94
+ this.instantiationService.createInstance(InstructionBreakpointsRenderer),
95
+ ], {
96
+ identityProvider: { getId: (element) => element.getId() },
97
+ multipleSelectionSupport: false,
98
+ keyboardNavigationLabelProvider: { getKeyboardNavigationLabel: (e) => e },
99
+ accessibilityProvider: ( new BreakpointsAccessibilityProvider(this.debugService, this.labelService)),
100
+ overrideStyles: {
101
+ listBackground: this.getBackgroundColor()
102
+ }
103
+ });
104
+ CONTEXT_BREAKPOINTS_FOCUSED.bindTo(this.list.contextKeyService);
105
+ this._register(this.list.onContextMenu(this.onListContextMenu, this));
106
+ this.list.onMouseMiddleClick(async ({ element }) => {
107
+ if (element instanceof Breakpoint) {
108
+ await this.debugService.removeBreakpoints(element.getId());
109
+ }
110
+ else if (element instanceof FunctionBreakpoint) {
111
+ await this.debugService.removeFunctionBreakpoints(element.getId());
112
+ }
113
+ else if (element instanceof DataBreakpoint) {
114
+ await this.debugService.removeDataBreakpoints(element.getId());
115
+ }
116
+ else if (element instanceof InstructionBreakpoint) {
117
+ await this.debugService.removeInstructionBreakpoints(element.instructionReference, element.offset);
118
+ }
119
+ });
120
+ this._register(this.list.onDidOpen(async (e) => {
121
+ if (!e.element) {
122
+ return;
123
+ }
124
+ if (dom.isMouseEvent(e.browserEvent) && e.browserEvent.button === 1) {
125
+ return;
126
+ }
127
+ if (e.element instanceof Breakpoint) {
128
+ openBreakpointSource(e.element, e.sideBySide, e.editorOptions.preserveFocus || false, e.editorOptions.pinned || !e.editorOptions.preserveFocus, this.debugService, this.editorService);
129
+ }
130
+ if (e.element instanceof InstructionBreakpoint) {
131
+ const disassemblyView = await this.editorService.openEditor(DisassemblyViewInput.instance);
132
+ disassemblyView.goToInstructionAndOffset(e.element.instructionReference, e.element.offset, dom.isMouseEvent(e.browserEvent) && e.browserEvent.detail === 2);
133
+ }
134
+ if (dom.isMouseEvent(e.browserEvent) && e.browserEvent.detail === 2 && e.element instanceof FunctionBreakpoint && e.element !== this.inputBoxData?.breakpoint) {
135
+ this.renderInputBox({ breakpoint: e.element, type: 'name' });
136
+ }
137
+ }));
138
+ this.list.splice(0, this.list.length, this.elements);
139
+ this._register(this.onDidChangeBodyVisibility(visible => {
140
+ if (visible) {
141
+ if (this.needsRefresh) {
142
+ this.onBreakpointsChange();
143
+ }
144
+ if (this.needsStateChange) {
145
+ this.onStateChange();
146
+ }
147
+ }
148
+ }));
149
+ const containerModel = this.viewDescriptorService.getViewContainerModel(this.viewDescriptorService.getViewContainerByViewId(this.id));
150
+ this._register(containerModel.onDidChangeAllViewDescriptors(() => {
151
+ this.updateSize();
152
+ }));
153
+ }
154
+ renderHeaderTitle(container, title) {
155
+ super.renderHeaderTitle(container, title);
156
+ const iconLabelContainer = dom.append(container, $('span.breakpoint-warning'));
157
+ this.hintContainer = this._register(( new IconLabel(iconLabelContainer, {
158
+ supportIcons: true, hoverDelegate: {
159
+ showHover: (options, focus) => this.hoverService.showHover({ content: options.content, target: this.hintContainer.element }, focus),
160
+ delay: this.configurationService.getValue('workbench.hover.delay')
161
+ }
162
+ })));
163
+ dom.hide(this.hintContainer.element);
164
+ }
165
+ focus() {
166
+ super.focus();
167
+ this.list?.domFocus();
168
+ }
169
+ renderInputBox(data) {
170
+ this._inputBoxData = data;
171
+ this.onBreakpointsChange();
172
+ this._inputBoxData = undefined;
173
+ }
174
+ get inputBoxData() {
175
+ return this._inputBoxData;
176
+ }
177
+ layoutBody(height, width) {
178
+ if (this.ignoreLayout) {
179
+ return;
180
+ }
181
+ super.layoutBody(height, width);
182
+ this.list?.layout(height, width);
183
+ try {
184
+ this.ignoreLayout = true;
185
+ this.updateSize();
186
+ }
187
+ finally {
188
+ this.ignoreLayout = false;
189
+ }
190
+ }
191
+ onListContextMenu(e) {
192
+ const element = e.element;
193
+ const type = element instanceof Breakpoint ? 'breakpoint' : element instanceof ExceptionBreakpoint ? 'exceptionBreakpoint' :
194
+ element instanceof FunctionBreakpoint ? 'functionBreakpoint' : element instanceof DataBreakpoint ? 'dataBreakpoint' :
195
+ element instanceof InstructionBreakpoint ? 'instructionBreakpoint' : undefined;
196
+ this.breakpointItemType.set(type);
197
+ const session = this.debugService.getViewModel().focusedSession;
198
+ const conditionSupported = element instanceof ExceptionBreakpoint ? element.supportsCondition : (!session || !!session.capabilities.supportsConditionalBreakpoints);
199
+ this.breakpointSupportsCondition.set(conditionSupported);
200
+ const secondary = [];
201
+ createAndFillInContextMenuActions(this.menu, { arg: e.element, shouldForwardArgs: false }, { primary: [], secondary }, 'inline');
202
+ this.contextMenuService.showContextMenu({
203
+ getAnchor: () => e.anchor,
204
+ getActions: () => secondary,
205
+ getActionsContext: () => element
206
+ });
207
+ }
208
+ updateSize() {
209
+ const containerModel = this.viewDescriptorService.getViewContainerModel(this.viewDescriptorService.getViewContainerByViewId(this.id));
210
+ const sessionId = this.debugService.getViewModel().focusedSession?.getId();
211
+ this.minimumBodySize = this.orientation === 0 ? getExpandedBodySize(this.debugService.getModel(), sessionId, MAX_VISIBLE_BREAKPOINTS) : 170;
212
+ this.maximumBodySize = this.orientation === 0 && containerModel.visibleViewDescriptors.length > 1 ? getExpandedBodySize(this.debugService.getModel(), sessionId, Number.POSITIVE_INFINITY) : Number.POSITIVE_INFINITY;
213
+ }
214
+ updateBreakpointsHint(delayed = false) {
215
+ if (!this.hintContainer) {
216
+ return;
217
+ }
218
+ const currentType = this.debugService.getViewModel().focusedSession?.configuration.type;
219
+ const dbg = currentType ? this.debugService.getAdapterManager().getDebugger(currentType) : undefined;
220
+ const message = dbg?.strings?.[DebuggerString.UnverifiedBreakpoints];
221
+ const debuggerHasUnverifiedBps = message && this.debugService.getModel().getBreakpoints().filter(bp => {
222
+ if (bp.verified || !bp.enabled) {
223
+ return false;
224
+ }
225
+ const langId = this.languageService.guessLanguageIdByFilepathOrFirstLine(bp.uri);
226
+ return langId && dbg.interestedInLanguage(langId);
227
+ });
228
+ if (message && debuggerHasUnverifiedBps?.length && this.debugService.getModel().areBreakpointsActivated()) {
229
+ if (delayed) {
230
+ const mdown = ( new MarkdownString(undefined, { isTrusted: true })).appendMarkdown(message);
231
+ this.hintContainer.setLabel('$(warning)', undefined, { title: { markdown: mdown, markdownNotSupportedFallback: message } });
232
+ dom.show(this.hintContainer.element);
233
+ }
234
+ else {
235
+ this.hintDelayer.schedule();
236
+ }
237
+ }
238
+ else {
239
+ dom.hide(this.hintContainer.element);
240
+ }
241
+ }
242
+ onBreakpointsChange() {
243
+ if (this.isBodyVisible()) {
244
+ this.updateSize();
245
+ if (this.list) {
246
+ const lastFocusIndex = this.list.getFocus()[0];
247
+ const needsRefocus = lastFocusIndex && !this.elements.includes(this.list.element(lastFocusIndex));
248
+ this.list.splice(0, this.list.length, this.elements);
249
+ this.needsRefresh = false;
250
+ if (needsRefocus) {
251
+ this.list.focusNth(Math.min(lastFocusIndex, this.list.length - 1));
252
+ }
253
+ }
254
+ this.updateBreakpointsHint();
255
+ }
256
+ else {
257
+ this.needsRefresh = true;
258
+ }
259
+ }
260
+ onStateChange() {
261
+ if (this.isBodyVisible()) {
262
+ this.needsStateChange = false;
263
+ const thread = this.debugService.getViewModel().focusedThread;
264
+ let found = false;
265
+ if (thread && thread.stoppedDetails && thread.stoppedDetails.hitBreakpointIds && thread.stoppedDetails.hitBreakpointIds.length > 0) {
266
+ const hitBreakpointIds = thread.stoppedDetails.hitBreakpointIds;
267
+ const elements = this.elements;
268
+ const index = elements.findIndex(e => {
269
+ const id = e.getIdFromAdapter(thread.session.getId());
270
+ return typeof id === 'number' && hitBreakpointIds.indexOf(id) !== -1;
271
+ });
272
+ if (index >= 0) {
273
+ this.list.setFocus([index]);
274
+ this.list.setSelection([index]);
275
+ found = true;
276
+ this.autoFocusedIndex = index;
277
+ }
278
+ }
279
+ if (!found) {
280
+ const focus = this.list.getFocus();
281
+ const selection = this.list.getSelection();
282
+ if (this.autoFocusedIndex >= 0 && equals(focus, selection) && focus.indexOf(this.autoFocusedIndex) >= 0) {
283
+ this.list.setFocus([]);
284
+ this.list.setSelection([]);
285
+ }
286
+ this.autoFocusedIndex = -1;
287
+ }
288
+ this.updateBreakpointsHint();
289
+ }
290
+ else {
291
+ this.needsStateChange = true;
292
+ }
293
+ }
294
+ get elements() {
295
+ const model = this.debugService.getModel();
296
+ const sessionId = this.debugService.getViewModel().focusedSession?.getId();
297
+ const elements = model.getExceptionBreakpointsForSession(sessionId).concat(model.getFunctionBreakpoints()).concat(model.getDataBreakpoints()).concat(model.getBreakpoints()).concat(model.getInstructionBreakpoints());
298
+ return elements;
299
+ }
300
+ };
301
+ BreakpointsView = ( __decorate([
302
+ ( __param(1, IContextMenuService)),
303
+ ( __param(2, IDebugService)),
304
+ ( __param(3, IKeybindingService)),
305
+ ( __param(4, IInstantiationService)),
306
+ ( __param(5, IThemeService)),
307
+ ( __param(6, IEditorService)),
308
+ ( __param(7, IContextViewService)),
309
+ ( __param(8, IConfigurationService)),
310
+ ( __param(9, IViewDescriptorService)),
311
+ ( __param(10, IContextKeyService)),
312
+ ( __param(11, IOpenerService)),
313
+ ( __param(12, ITelemetryService)),
314
+ ( __param(13, ILabelService)),
315
+ ( __param(14, IMenuService)),
316
+ ( __param(15, IHoverService)),
317
+ ( __param(16, ILanguageService))
318
+ ], BreakpointsView));
319
+ class BreakpointsDelegate {
320
+ constructor(view) {
321
+ this.view = view;
322
+ }
323
+ getHeight(_element) {
324
+ return 22;
325
+ }
326
+ getTemplateId(element) {
327
+ if (element instanceof Breakpoint) {
328
+ return BreakpointsRenderer.ID;
329
+ }
330
+ if (element instanceof FunctionBreakpoint) {
331
+ const inputBoxBreakpoint = this.view.inputBoxData?.breakpoint;
332
+ if (!element.name || (inputBoxBreakpoint && inputBoxBreakpoint.getId() === element.getId())) {
333
+ return FunctionBreakpointInputRenderer.ID;
334
+ }
335
+ return FunctionBreakpointsRenderer.ID;
336
+ }
337
+ if (element instanceof ExceptionBreakpoint) {
338
+ const inputBoxBreakpoint = this.view.inputBoxData?.breakpoint;
339
+ if (inputBoxBreakpoint && inputBoxBreakpoint.getId() === element.getId()) {
340
+ return ExceptionBreakpointInputRenderer.ID;
341
+ }
342
+ return ExceptionBreakpointsRenderer.ID;
343
+ }
344
+ if (element instanceof DataBreakpoint) {
345
+ const inputBoxBreakpoint = this.view.inputBoxData?.breakpoint;
346
+ if (inputBoxBreakpoint && inputBoxBreakpoint.getId() === element.getId()) {
347
+ return DataBreakpointInputRenderer.ID;
348
+ }
349
+ return DataBreakpointsRenderer.ID;
350
+ }
351
+ if (element instanceof InstructionBreakpoint) {
352
+ return InstructionBreakpointsRenderer.ID;
353
+ }
354
+ return '';
355
+ }
356
+ }
357
+ const breakpointIdToActionBarDomeNode = ( new Map());
358
+ let BreakpointsRenderer = class BreakpointsRenderer {
359
+ static { BreakpointsRenderer_1 = this; }
360
+ constructor(menu, breakpointSupportsCondition, breakpointItemType, debugService, labelService) {
361
+ this.menu = menu;
362
+ this.breakpointSupportsCondition = breakpointSupportsCondition;
363
+ this.breakpointItemType = breakpointItemType;
364
+ this.debugService = debugService;
365
+ this.labelService = labelService;
366
+ }
367
+ static { this.ID = 'breakpoints'; }
368
+ get templateId() {
369
+ return BreakpointsRenderer_1.ID;
370
+ }
371
+ renderTemplate(container) {
372
+ const data = Object.create(null);
373
+ data.toDispose = [];
374
+ data.breakpoint = dom.append(container, $('.breakpoint'));
375
+ data.icon = $('.icon');
376
+ data.checkbox = createCheckbox(data.toDispose);
377
+ data.toDispose.push(dom.addStandardDisposableListener(data.checkbox, 'change', (e) => {
378
+ this.debugService.enableOrDisableBreakpoints(!data.context.enabled, data.context);
379
+ }));
380
+ dom.append(data.breakpoint, data.icon);
381
+ dom.append(data.breakpoint, data.checkbox);
382
+ data.name = dom.append(data.breakpoint, $('span.name'));
383
+ data.filePath = dom.append(data.breakpoint, $('span.file-path'));
384
+ data.actionBar = ( new ActionBar(data.breakpoint));
385
+ data.toDispose.push(data.actionBar);
386
+ const lineNumberContainer = dom.append(data.breakpoint, $('.line-number-container'));
387
+ data.lineNumber = dom.append(lineNumberContainer, $('span.line-number.monaco-count-badge'));
388
+ return data;
389
+ }
390
+ renderElement(breakpoint, index, data) {
391
+ data.context = breakpoint;
392
+ data.breakpoint.classList.toggle('disabled', !this.debugService.getModel().areBreakpointsActivated());
393
+ data.name.textContent = resources.basenameOrAuthority(breakpoint.uri);
394
+ data.lineNumber.textContent = ( breakpoint.lineNumber.toString());
395
+ if (breakpoint.column) {
396
+ data.lineNumber.textContent += `:${breakpoint.column}`;
397
+ }
398
+ data.filePath.textContent = this.labelService.getUriLabel(resources.dirname(breakpoint.uri), { relative: true });
399
+ data.checkbox.checked = breakpoint.enabled;
400
+ const { message, icon } = getBreakpointMessageAndIcon(this.debugService.state, this.debugService.getModel().areBreakpointsActivated(), breakpoint, this.labelService);
401
+ data.icon.className = ThemeIcon.asClassName(icon);
402
+ data.breakpoint.title = breakpoint.message || message || '';
403
+ const debugActive = this.debugService.state === 3 || this.debugService.state === 2 ;
404
+ if (debugActive && !breakpoint.verified) {
405
+ data.breakpoint.classList.add('disabled');
406
+ }
407
+ const primary = [];
408
+ const session = this.debugService.getViewModel().focusedSession;
409
+ this.breakpointSupportsCondition.set(!session || !!session.capabilities.supportsConditionalBreakpoints);
410
+ this.breakpointItemType.set('breakpoint');
411
+ createAndFillInActionBarActions(this.menu, { arg: breakpoint, shouldForwardArgs: true }, { primary, secondary: [] }, 'inline');
412
+ data.actionBar.clear();
413
+ data.actionBar.push(primary, { icon: true, label: false });
414
+ breakpointIdToActionBarDomeNode.set(breakpoint.getId(), data.actionBar.domNode);
415
+ }
416
+ disposeTemplate(templateData) {
417
+ dispose(templateData.toDispose);
418
+ }
419
+ };
420
+ BreakpointsRenderer = BreakpointsRenderer_1 = ( __decorate([
421
+ ( __param(3, IDebugService)),
422
+ ( __param(4, ILabelService))
423
+ ], BreakpointsRenderer));
424
+ class ExceptionBreakpointsRenderer {
425
+ constructor(menu, breakpointSupportsCondition, breakpointItemType, debugService) {
426
+ this.menu = menu;
427
+ this.breakpointSupportsCondition = breakpointSupportsCondition;
428
+ this.breakpointItemType = breakpointItemType;
429
+ this.debugService = debugService;
430
+ }
431
+ static { this.ID = 'exceptionbreakpoints'; }
432
+ get templateId() {
433
+ return ExceptionBreakpointsRenderer.ID;
434
+ }
435
+ renderTemplate(container) {
436
+ const data = Object.create(null);
437
+ data.toDispose = [];
438
+ data.breakpoint = dom.append(container, $('.breakpoint'));
439
+ data.checkbox = createCheckbox(data.toDispose);
440
+ data.toDispose.push(dom.addStandardDisposableListener(data.checkbox, 'change', (e) => {
441
+ this.debugService.enableOrDisableBreakpoints(!data.context.enabled, data.context);
442
+ }));
443
+ dom.append(data.breakpoint, data.checkbox);
444
+ data.name = dom.append(data.breakpoint, $('span.name'));
445
+ data.condition = dom.append(data.breakpoint, $('span.condition'));
446
+ data.breakpoint.classList.add('exception');
447
+ data.actionBar = ( new ActionBar(data.breakpoint));
448
+ data.toDispose.push(data.actionBar);
449
+ return data;
450
+ }
451
+ renderElement(exceptionBreakpoint, index, data) {
452
+ data.context = exceptionBreakpoint;
453
+ data.name.textContent = exceptionBreakpoint.label || `${exceptionBreakpoint.filter} exceptions`;
454
+ data.breakpoint.title = exceptionBreakpoint.verified ? (exceptionBreakpoint.description || data.name.textContent) : exceptionBreakpoint.message || ( localizeWithPath(
455
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
456
+ 'unverifiedExceptionBreakpoint',
457
+ "Unverified Exception Breakpoint"
458
+ ));
459
+ data.breakpoint.classList.toggle('disabled', !exceptionBreakpoint.verified);
460
+ data.checkbox.checked = exceptionBreakpoint.enabled;
461
+ data.condition.textContent = exceptionBreakpoint.condition || '';
462
+ data.condition.title = ( localizeWithPath(
463
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
464
+ 'expressionCondition',
465
+ "Expression condition: {0}",
466
+ exceptionBreakpoint.condition
467
+ ));
468
+ const primary = [];
469
+ this.breakpointSupportsCondition.set(exceptionBreakpoint.supportsCondition);
470
+ this.breakpointItemType.set('exceptionBreakpoint');
471
+ createAndFillInActionBarActions(this.menu, { arg: exceptionBreakpoint, shouldForwardArgs: true }, { primary, secondary: [] }, 'inline');
472
+ data.actionBar.clear();
473
+ data.actionBar.push(primary, { icon: true, label: false });
474
+ breakpointIdToActionBarDomeNode.set(exceptionBreakpoint.getId(), data.actionBar.domNode);
475
+ }
476
+ disposeTemplate(templateData) {
477
+ dispose(templateData.toDispose);
478
+ }
479
+ }
480
+ let FunctionBreakpointsRenderer = class FunctionBreakpointsRenderer {
481
+ static { FunctionBreakpointsRenderer_1 = this; }
482
+ constructor(menu, breakpointSupportsCondition, breakpointItemType, debugService, labelService) {
483
+ this.menu = menu;
484
+ this.breakpointSupportsCondition = breakpointSupportsCondition;
485
+ this.breakpointItemType = breakpointItemType;
486
+ this.debugService = debugService;
487
+ this.labelService = labelService;
488
+ }
489
+ static { this.ID = 'functionbreakpoints'; }
490
+ get templateId() {
491
+ return FunctionBreakpointsRenderer_1.ID;
492
+ }
493
+ renderTemplate(container) {
494
+ const data = Object.create(null);
495
+ data.toDispose = [];
496
+ data.breakpoint = dom.append(container, $('.breakpoint'));
497
+ data.icon = $('.icon');
498
+ data.checkbox = createCheckbox(data.toDispose);
499
+ data.toDispose.push(dom.addStandardDisposableListener(data.checkbox, 'change', (e) => {
500
+ this.debugService.enableOrDisableBreakpoints(!data.context.enabled, data.context);
501
+ }));
502
+ dom.append(data.breakpoint, data.icon);
503
+ dom.append(data.breakpoint, data.checkbox);
504
+ data.name = dom.append(data.breakpoint, $('span.name'));
505
+ data.condition = dom.append(data.breakpoint, $('span.condition'));
506
+ data.actionBar = ( new ActionBar(data.breakpoint));
507
+ data.toDispose.push(data.actionBar);
508
+ return data;
509
+ }
510
+ renderElement(functionBreakpoint, _index, data) {
511
+ data.context = functionBreakpoint;
512
+ data.name.textContent = functionBreakpoint.name;
513
+ const { icon, message } = getBreakpointMessageAndIcon(this.debugService.state, this.debugService.getModel().areBreakpointsActivated(), functionBreakpoint, this.labelService);
514
+ data.icon.className = ThemeIcon.asClassName(icon);
515
+ data.icon.title = message ? message : '';
516
+ data.checkbox.checked = functionBreakpoint.enabled;
517
+ data.breakpoint.title = message ? message : '';
518
+ if (functionBreakpoint.condition && functionBreakpoint.hitCondition) {
519
+ data.condition.textContent = ( localizeWithPath(
520
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
521
+ 'expressionAndHitCount',
522
+ "Condition: {0} | Hit Count: {1}",
523
+ functionBreakpoint.condition,
524
+ functionBreakpoint.hitCondition
525
+ ));
526
+ }
527
+ else {
528
+ data.condition.textContent = functionBreakpoint.condition || functionBreakpoint.hitCondition || '';
529
+ }
530
+ const session = this.debugService.getViewModel().focusedSession;
531
+ data.breakpoint.classList.toggle('disabled', (session && !session.capabilities.supportsFunctionBreakpoints) || !this.debugService.getModel().areBreakpointsActivated());
532
+ if (session && !session.capabilities.supportsFunctionBreakpoints) {
533
+ data.breakpoint.title = ( localizeWithPath(
534
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
535
+ 'functionBreakpointsNotSupported',
536
+ "Function breakpoints are not supported by this debug type"
537
+ ));
538
+ }
539
+ const primary = [];
540
+ this.breakpointSupportsCondition.set(!session || !!session.capabilities.supportsConditionalBreakpoints);
541
+ this.breakpointItemType.set('functionBreakpoint');
542
+ createAndFillInActionBarActions(this.menu, { arg: functionBreakpoint, shouldForwardArgs: true }, { primary, secondary: [] }, 'inline');
543
+ data.actionBar.clear();
544
+ data.actionBar.push(primary, { icon: true, label: false });
545
+ breakpointIdToActionBarDomeNode.set(functionBreakpoint.getId(), data.actionBar.domNode);
546
+ }
547
+ disposeTemplate(templateData) {
548
+ dispose(templateData.toDispose);
549
+ }
550
+ };
551
+ FunctionBreakpointsRenderer = FunctionBreakpointsRenderer_1 = ( __decorate([
552
+ ( __param(3, IDebugService)),
553
+ ( __param(4, ILabelService))
554
+ ], FunctionBreakpointsRenderer));
555
+ let DataBreakpointsRenderer = class DataBreakpointsRenderer {
556
+ static { DataBreakpointsRenderer_1 = this; }
557
+ constructor(menu, breakpointSupportsCondition, breakpointItemType, debugService, labelService) {
558
+ this.menu = menu;
559
+ this.breakpointSupportsCondition = breakpointSupportsCondition;
560
+ this.breakpointItemType = breakpointItemType;
561
+ this.debugService = debugService;
562
+ this.labelService = labelService;
563
+ }
564
+ static { this.ID = 'databreakpoints'; }
565
+ get templateId() {
566
+ return DataBreakpointsRenderer_1.ID;
567
+ }
568
+ renderTemplate(container) {
569
+ const data = Object.create(null);
570
+ data.breakpoint = dom.append(container, $('.breakpoint'));
571
+ data.toDispose = [];
572
+ data.icon = $('.icon');
573
+ data.checkbox = createCheckbox(data.toDispose);
574
+ data.toDispose.push(dom.addStandardDisposableListener(data.checkbox, 'change', (e) => {
575
+ this.debugService.enableOrDisableBreakpoints(!data.context.enabled, data.context);
576
+ }));
577
+ dom.append(data.breakpoint, data.icon);
578
+ dom.append(data.breakpoint, data.checkbox);
579
+ data.name = dom.append(data.breakpoint, $('span.name'));
580
+ data.accessType = dom.append(data.breakpoint, $('span.access-type'));
581
+ data.condition = dom.append(data.breakpoint, $('span.condition'));
582
+ data.actionBar = ( new ActionBar(data.breakpoint));
583
+ data.toDispose.push(data.actionBar);
584
+ return data;
585
+ }
586
+ renderElement(dataBreakpoint, _index, data) {
587
+ data.context = dataBreakpoint;
588
+ data.name.textContent = dataBreakpoint.description;
589
+ const { icon, message } = getBreakpointMessageAndIcon(this.debugService.state, this.debugService.getModel().areBreakpointsActivated(), dataBreakpoint, this.labelService);
590
+ data.icon.className = ThemeIcon.asClassName(icon);
591
+ data.icon.title = message ? message : '';
592
+ data.checkbox.checked = dataBreakpoint.enabled;
593
+ data.breakpoint.title = message ? message : '';
594
+ const session = this.debugService.getViewModel().focusedSession;
595
+ data.breakpoint.classList.toggle('disabled', (session && !session.capabilities.supportsDataBreakpoints) || !this.debugService.getModel().areBreakpointsActivated());
596
+ if (session && !session.capabilities.supportsDataBreakpoints) {
597
+ data.breakpoint.title = ( localizeWithPath(
598
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
599
+ 'dataBreakpointsNotSupported',
600
+ "Data breakpoints are not supported by this debug type"
601
+ ));
602
+ }
603
+ if (dataBreakpoint.accessType) {
604
+ const accessType = dataBreakpoint.accessType === 'read' ? ( localizeWithPath('vs/workbench/contrib/debug/browser/breakpointsView', 'read', "Read")) : dataBreakpoint.accessType === 'write' ? ( localizeWithPath('vs/workbench/contrib/debug/browser/breakpointsView', 'write', "Write")) : ( localizeWithPath('vs/workbench/contrib/debug/browser/breakpointsView', 'access', "Access"));
605
+ data.accessType.textContent = accessType;
606
+ }
607
+ else {
608
+ data.accessType.textContent = '';
609
+ }
610
+ if (dataBreakpoint.condition && dataBreakpoint.hitCondition) {
611
+ data.condition.textContent = ( localizeWithPath(
612
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
613
+ 'expressionAndHitCount',
614
+ "Condition: {0} | Hit Count: {1}",
615
+ dataBreakpoint.condition,
616
+ dataBreakpoint.hitCondition
617
+ ));
618
+ }
619
+ else {
620
+ data.condition.textContent = dataBreakpoint.condition || dataBreakpoint.hitCondition || '';
621
+ }
622
+ const primary = [];
623
+ this.breakpointSupportsCondition.set(!session || !!session.capabilities.supportsConditionalBreakpoints);
624
+ this.breakpointItemType.set('dataBreakpoint');
625
+ createAndFillInActionBarActions(this.menu, { arg: dataBreakpoint, shouldForwardArgs: true }, { primary, secondary: [] }, 'inline');
626
+ data.actionBar.clear();
627
+ data.actionBar.push(primary, { icon: true, label: false });
628
+ breakpointIdToActionBarDomeNode.set(dataBreakpoint.getId(), data.actionBar.domNode);
629
+ }
630
+ disposeTemplate(templateData) {
631
+ dispose(templateData.toDispose);
632
+ }
633
+ };
634
+ DataBreakpointsRenderer = DataBreakpointsRenderer_1 = ( __decorate([
635
+ ( __param(3, IDebugService)),
636
+ ( __param(4, ILabelService))
637
+ ], DataBreakpointsRenderer));
638
+ let InstructionBreakpointsRenderer = class InstructionBreakpointsRenderer {
639
+ static { InstructionBreakpointsRenderer_1 = this; }
640
+ constructor(debugService, labelService) {
641
+ this.debugService = debugService;
642
+ this.labelService = labelService;
643
+ }
644
+ static { this.ID = 'instructionBreakpoints'; }
645
+ get templateId() {
646
+ return InstructionBreakpointsRenderer_1.ID;
647
+ }
648
+ renderTemplate(container) {
649
+ const data = Object.create(null);
650
+ data.toDispose = [];
651
+ data.breakpoint = dom.append(container, $('.breakpoint'));
652
+ data.icon = $('.icon');
653
+ data.checkbox = createCheckbox(data.toDispose);
654
+ data.toDispose.push(dom.addStandardDisposableListener(data.checkbox, 'change', (e) => {
655
+ this.debugService.enableOrDisableBreakpoints(!data.context.enabled, data.context);
656
+ }));
657
+ dom.append(data.breakpoint, data.icon);
658
+ dom.append(data.breakpoint, data.checkbox);
659
+ data.name = dom.append(data.breakpoint, $('span.name'));
660
+ data.address = dom.append(data.breakpoint, $('span.file-path'));
661
+ data.actionBar = ( new ActionBar(data.breakpoint));
662
+ data.toDispose.push(data.actionBar);
663
+ return data;
664
+ }
665
+ renderElement(breakpoint, index, data) {
666
+ data.context = breakpoint;
667
+ data.breakpoint.classList.toggle('disabled', !this.debugService.getModel().areBreakpointsActivated());
668
+ data.name.textContent = '0x' + ( breakpoint.address.toString(16));
669
+ data.name.title = `Decimal address: breakpoint.address.toString()`;
670
+ data.checkbox.checked = breakpoint.enabled;
671
+ const { message, icon } = getBreakpointMessageAndIcon(this.debugService.state, this.debugService.getModel().areBreakpointsActivated(), breakpoint, this.labelService);
672
+ data.icon.className = ThemeIcon.asClassName(icon);
673
+ data.breakpoint.title = breakpoint.message || message || '';
674
+ const debugActive = this.debugService.state === 3 || this.debugService.state === 2 ;
675
+ if (debugActive && !breakpoint.verified) {
676
+ data.breakpoint.classList.add('disabled');
677
+ }
678
+ }
679
+ disposeTemplate(templateData) {
680
+ dispose(templateData.toDispose);
681
+ }
682
+ };
683
+ InstructionBreakpointsRenderer = InstructionBreakpointsRenderer_1 = ( __decorate([
684
+ ( __param(0, IDebugService)),
685
+ ( __param(1, ILabelService))
686
+ ], InstructionBreakpointsRenderer));
687
+ class FunctionBreakpointInputRenderer {
688
+ constructor(view, debugService, contextViewService, labelService) {
689
+ this.view = view;
690
+ this.debugService = debugService;
691
+ this.contextViewService = contextViewService;
692
+ this.labelService = labelService;
693
+ }
694
+ static { this.ID = 'functionbreakpointinput'; }
695
+ get templateId() {
696
+ return FunctionBreakpointInputRenderer.ID;
697
+ }
698
+ renderTemplate(container) {
699
+ const template = Object.create(null);
700
+ const toDispose = [];
701
+ const breakpoint = dom.append(container, $('.breakpoint'));
702
+ template.icon = $('.icon');
703
+ template.checkbox = createCheckbox(toDispose);
704
+ dom.append(breakpoint, template.icon);
705
+ dom.append(breakpoint, template.checkbox);
706
+ this.view.breakpointInputFocused.set(true);
707
+ const inputBoxContainer = dom.append(breakpoint, $('.inputBoxContainer'));
708
+ const inputBox = ( new InputBox(
709
+ inputBoxContainer,
710
+ this.contextViewService,
711
+ { inputBoxStyles: defaultInputBoxStyles }
712
+ ));
713
+ const wrapUp = (success) => {
714
+ template.updating = true;
715
+ try {
716
+ this.view.breakpointInputFocused.set(false);
717
+ const id = template.breakpoint.getId();
718
+ if (success) {
719
+ if (template.type === 'name') {
720
+ this.debugService.updateFunctionBreakpoint(id, { name: inputBox.value });
721
+ }
722
+ if (template.type === 'condition') {
723
+ this.debugService.updateFunctionBreakpoint(id, { condition: inputBox.value });
724
+ }
725
+ if (template.type === 'hitCount') {
726
+ this.debugService.updateFunctionBreakpoint(id, { hitCondition: inputBox.value });
727
+ }
728
+ }
729
+ else {
730
+ if (template.type === 'name' && !template.breakpoint.name) {
731
+ this.debugService.removeFunctionBreakpoints(id);
732
+ }
733
+ else {
734
+ this.view.renderInputBox(undefined);
735
+ }
736
+ }
737
+ }
738
+ finally {
739
+ template.updating = false;
740
+ }
741
+ };
742
+ toDispose.push(dom.addStandardDisposableListener(inputBox.inputElement, 'keydown', (e) => {
743
+ const isEscape = e.equals(9 );
744
+ const isEnter = e.equals(3 );
745
+ if (isEscape || isEnter) {
746
+ e.preventDefault();
747
+ e.stopPropagation();
748
+ wrapUp(isEnter);
749
+ }
750
+ }));
751
+ toDispose.push(dom.addDisposableListener(inputBox.inputElement, 'blur', () => {
752
+ if (!template.updating) {
753
+ wrapUp(!!inputBox.value);
754
+ }
755
+ }));
756
+ template.inputBox = inputBox;
757
+ template.toDispose = toDispose;
758
+ return template;
759
+ }
760
+ renderElement(functionBreakpoint, _index, data) {
761
+ data.breakpoint = functionBreakpoint;
762
+ data.type = this.view.inputBoxData?.type || 'name';
763
+ const { icon, message } = getBreakpointMessageAndIcon(this.debugService.state, this.debugService.getModel().areBreakpointsActivated(), functionBreakpoint, this.labelService);
764
+ data.icon.className = ThemeIcon.asClassName(icon);
765
+ data.icon.title = message ? message : '';
766
+ data.checkbox.checked = functionBreakpoint.enabled;
767
+ data.checkbox.disabled = true;
768
+ data.inputBox.value = functionBreakpoint.name || '';
769
+ let placeholder = ( localizeWithPath(
770
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
771
+ 'functionBreakpointPlaceholder',
772
+ "Function to break on"
773
+ ));
774
+ let ariaLabel = ( localizeWithPath(
775
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
776
+ 'functionBreakPointInputAriaLabel',
777
+ "Type function breakpoint."
778
+ ));
779
+ if (data.type === 'condition') {
780
+ data.inputBox.value = functionBreakpoint.condition || '';
781
+ placeholder = ( localizeWithPath(
782
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
783
+ 'functionBreakpointExpressionPlaceholder',
784
+ "Break when expression evaluates to true"
785
+ ));
786
+ ariaLabel = ( localizeWithPath(
787
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
788
+ 'functionBreakPointExpresionAriaLabel',
789
+ "Type expression. Function breakpoint will break when expression evaluates to true"
790
+ ));
791
+ }
792
+ else if (data.type === 'hitCount') {
793
+ data.inputBox.value = functionBreakpoint.hitCondition || '';
794
+ placeholder = ( localizeWithPath(
795
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
796
+ 'functionBreakpointHitCountPlaceholder',
797
+ "Break when hit count is met"
798
+ ));
799
+ ariaLabel = ( localizeWithPath(
800
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
801
+ 'functionBreakPointHitCountAriaLabel',
802
+ "Type hit count. Function breakpoint will break when hit count is met."
803
+ ));
804
+ }
805
+ data.inputBox.setAriaLabel(ariaLabel);
806
+ data.inputBox.setPlaceHolder(placeholder);
807
+ setTimeout(() => {
808
+ data.inputBox.focus();
809
+ data.inputBox.select();
810
+ }, 0);
811
+ }
812
+ disposeTemplate(templateData) {
813
+ dispose(templateData.toDispose);
814
+ }
815
+ }
816
+ class DataBreakpointInputRenderer {
817
+ constructor(view, debugService, contextViewService, labelService) {
818
+ this.view = view;
819
+ this.debugService = debugService;
820
+ this.contextViewService = contextViewService;
821
+ this.labelService = labelService;
822
+ }
823
+ static { this.ID = 'databreakpointinput'; }
824
+ get templateId() {
825
+ return DataBreakpointInputRenderer.ID;
826
+ }
827
+ renderTemplate(container) {
828
+ const template = Object.create(null);
829
+ const toDispose = [];
830
+ const breakpoint = dom.append(container, $('.breakpoint'));
831
+ template.icon = $('.icon');
832
+ template.checkbox = createCheckbox(toDispose);
833
+ dom.append(breakpoint, template.icon);
834
+ dom.append(breakpoint, template.checkbox);
835
+ this.view.breakpointInputFocused.set(true);
836
+ const inputBoxContainer = dom.append(breakpoint, $('.inputBoxContainer'));
837
+ const inputBox = ( new InputBox(
838
+ inputBoxContainer,
839
+ this.contextViewService,
840
+ { inputBoxStyles: defaultInputBoxStyles }
841
+ ));
842
+ const wrapUp = (success) => {
843
+ template.updating = true;
844
+ try {
845
+ this.view.breakpointInputFocused.set(false);
846
+ const id = template.breakpoint.getId();
847
+ if (success) {
848
+ if (template.type === 'condition') {
849
+ this.debugService.updateDataBreakpoint(id, { condition: inputBox.value });
850
+ }
851
+ if (template.type === 'hitCount') {
852
+ this.debugService.updateDataBreakpoint(id, { hitCondition: inputBox.value });
853
+ }
854
+ }
855
+ else {
856
+ this.view.renderInputBox(undefined);
857
+ }
858
+ }
859
+ finally {
860
+ template.updating = false;
861
+ }
862
+ };
863
+ toDispose.push(dom.addStandardDisposableListener(inputBox.inputElement, 'keydown', (e) => {
864
+ const isEscape = e.equals(9 );
865
+ const isEnter = e.equals(3 );
866
+ if (isEscape || isEnter) {
867
+ e.preventDefault();
868
+ e.stopPropagation();
869
+ wrapUp(isEnter);
870
+ }
871
+ }));
872
+ toDispose.push(dom.addDisposableListener(inputBox.inputElement, 'blur', () => {
873
+ if (!template.updating) {
874
+ wrapUp(!!inputBox.value);
875
+ }
876
+ }));
877
+ template.inputBox = inputBox;
878
+ template.toDispose = toDispose;
879
+ return template;
880
+ }
881
+ renderElement(dataBreakpoint, _index, data) {
882
+ data.breakpoint = dataBreakpoint;
883
+ data.type = this.view.inputBoxData?.type || 'condition';
884
+ const { icon, message } = getBreakpointMessageAndIcon(this.debugService.state, this.debugService.getModel().areBreakpointsActivated(), dataBreakpoint, this.labelService);
885
+ data.icon.className = ThemeIcon.asClassName(icon);
886
+ data.icon.title = message ? message : '';
887
+ data.checkbox.checked = dataBreakpoint.enabled;
888
+ data.checkbox.disabled = true;
889
+ data.inputBox.value = '';
890
+ let placeholder = '';
891
+ let ariaLabel = '';
892
+ if (data.type === 'condition') {
893
+ data.inputBox.value = dataBreakpoint.condition || '';
894
+ placeholder = ( localizeWithPath(
895
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
896
+ 'dataBreakpointExpressionPlaceholder',
897
+ "Break when expression evaluates to true"
898
+ ));
899
+ ariaLabel = ( localizeWithPath(
900
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
901
+ 'dataBreakPointExpresionAriaLabel',
902
+ "Type expression. Data breakpoint will break when expression evaluates to true"
903
+ ));
904
+ }
905
+ else if (data.type === 'hitCount') {
906
+ data.inputBox.value = dataBreakpoint.hitCondition || '';
907
+ placeholder = ( localizeWithPath(
908
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
909
+ 'dataBreakpointHitCountPlaceholder',
910
+ "Break when hit count is met"
911
+ ));
912
+ ariaLabel = ( localizeWithPath(
913
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
914
+ 'dataBreakPointHitCountAriaLabel',
915
+ "Type hit count. Data breakpoint will break when hit count is met."
916
+ ));
917
+ }
918
+ data.inputBox.setAriaLabel(ariaLabel);
919
+ data.inputBox.setPlaceHolder(placeholder);
920
+ setTimeout(() => {
921
+ data.inputBox.focus();
922
+ data.inputBox.select();
923
+ }, 0);
924
+ }
925
+ disposeTemplate(templateData) {
926
+ dispose(templateData.toDispose);
927
+ }
928
+ }
929
+ class ExceptionBreakpointInputRenderer {
930
+ constructor(view, debugService, contextViewService) {
931
+ this.view = view;
932
+ this.debugService = debugService;
933
+ this.contextViewService = contextViewService;
934
+ }
935
+ static { this.ID = 'exceptionbreakpointinput'; }
936
+ get templateId() {
937
+ return ExceptionBreakpointInputRenderer.ID;
938
+ }
939
+ renderTemplate(container) {
940
+ const template = Object.create(null);
941
+ const toDispose = [];
942
+ const breakpoint = dom.append(container, $('.breakpoint'));
943
+ breakpoint.classList.add('exception');
944
+ template.checkbox = createCheckbox(toDispose);
945
+ dom.append(breakpoint, template.checkbox);
946
+ this.view.breakpointInputFocused.set(true);
947
+ const inputBoxContainer = dom.append(breakpoint, $('.inputBoxContainer'));
948
+ const inputBox = ( new InputBox(inputBoxContainer, this.contextViewService, {
949
+ ariaLabel: ( localizeWithPath(
950
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
951
+ 'exceptionBreakpointAriaLabel',
952
+ "Type exception breakpoint condition"
953
+ )),
954
+ inputBoxStyles: defaultInputBoxStyles
955
+ }));
956
+ const wrapUp = (success) => {
957
+ this.view.breakpointInputFocused.set(false);
958
+ let newCondition = template.breakpoint.condition;
959
+ if (success) {
960
+ newCondition = inputBox.value !== '' ? inputBox.value : undefined;
961
+ }
962
+ this.debugService.setExceptionBreakpointCondition(template.breakpoint, newCondition);
963
+ };
964
+ toDispose.push(dom.addStandardDisposableListener(inputBox.inputElement, 'keydown', (e) => {
965
+ const isEscape = e.equals(9 );
966
+ const isEnter = e.equals(3 );
967
+ if (isEscape || isEnter) {
968
+ e.preventDefault();
969
+ e.stopPropagation();
970
+ wrapUp(isEnter);
971
+ }
972
+ }));
973
+ toDispose.push(dom.addDisposableListener(inputBox.inputElement, 'blur', () => {
974
+ setTimeout(() => {
975
+ wrapUp(true);
976
+ });
977
+ }));
978
+ template.inputBox = inputBox;
979
+ template.toDispose = toDispose;
980
+ return template;
981
+ }
982
+ renderElement(exceptionBreakpoint, _index, data) {
983
+ const placeHolder = exceptionBreakpoint.conditionDescription || ( localizeWithPath(
984
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
985
+ 'exceptionBreakpointPlaceholder',
986
+ "Break when expression evaluates to true"
987
+ ));
988
+ data.inputBox.setPlaceHolder(placeHolder);
989
+ data.breakpoint = exceptionBreakpoint;
990
+ data.checkbox.checked = exceptionBreakpoint.enabled;
991
+ data.checkbox.disabled = true;
992
+ data.inputBox.value = exceptionBreakpoint.condition || '';
993
+ setTimeout(() => {
994
+ data.inputBox.focus();
995
+ data.inputBox.select();
996
+ }, 0);
997
+ }
998
+ disposeTemplate(templateData) {
999
+ dispose(templateData.toDispose);
1000
+ }
1001
+ }
1002
+ class BreakpointsAccessibilityProvider {
1003
+ constructor(debugService, labelService) {
1004
+ this.debugService = debugService;
1005
+ this.labelService = labelService;
1006
+ }
1007
+ getWidgetAriaLabel() {
1008
+ return ( localizeWithPath(
1009
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1010
+ 'breakpoints',
1011
+ "Breakpoints"
1012
+ ));
1013
+ }
1014
+ getRole() {
1015
+ return 'checkbox';
1016
+ }
1017
+ isChecked(breakpoint) {
1018
+ return breakpoint.enabled;
1019
+ }
1020
+ getAriaLabel(element) {
1021
+ if (element instanceof ExceptionBreakpoint) {
1022
+ return ( element.toString());
1023
+ }
1024
+ const { message } = getBreakpointMessageAndIcon(this.debugService.state, this.debugService.getModel().areBreakpointsActivated(), element, this.labelService);
1025
+ const toString = ( element.toString());
1026
+ return message ? `${toString}, ${message}` : toString;
1027
+ }
1028
+ }
1029
+ function openBreakpointSource(breakpoint, sideBySide, preserveFocus, pinned, debugService, editorService) {
1030
+ if (breakpoint.uri.scheme === DEBUG_SCHEME && debugService.state === 0 ) {
1031
+ return Promise.resolve(undefined);
1032
+ }
1033
+ const selection = breakpoint.endLineNumber ? {
1034
+ startLineNumber: breakpoint.lineNumber,
1035
+ endLineNumber: breakpoint.endLineNumber,
1036
+ startColumn: breakpoint.column || 1,
1037
+ endColumn: breakpoint.endColumn || 1073741824
1038
+ } : {
1039
+ startLineNumber: breakpoint.lineNumber,
1040
+ startColumn: breakpoint.column || 1,
1041
+ endLineNumber: breakpoint.lineNumber,
1042
+ endColumn: breakpoint.column || 1073741824
1043
+ };
1044
+ return editorService.openEditor({
1045
+ resource: breakpoint.uri,
1046
+ options: {
1047
+ preserveFocus,
1048
+ selection,
1049
+ revealIfOpened: true,
1050
+ selectionRevealType: 1 ,
1051
+ pinned
1052
+ }
1053
+ }, sideBySide ? SIDE_GROUP : ACTIVE_GROUP);
1054
+ }
1055
+ function getBreakpointMessageAndIcon(state, breakpointsActivated, breakpoint$1, labelService) {
1056
+ const debugActive = state === 3 || state === 2 ;
1057
+ const breakpointIcon = breakpoint$1 instanceof DataBreakpoint ? dataBreakpoint : breakpoint$1 instanceof FunctionBreakpoint ? functionBreakpoint : breakpoint$1.logMessage ? logBreakpoint : breakpoint;
1058
+ if (!breakpoint$1.enabled || !breakpointsActivated) {
1059
+ return {
1060
+ icon: breakpointIcon.disabled,
1061
+ message: breakpoint$1.logMessage ? ( localizeWithPath(
1062
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1063
+ 'disabledLogpoint',
1064
+ "Disabled Logpoint"
1065
+ )) : ( localizeWithPath(
1066
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1067
+ 'disabledBreakpoint',
1068
+ "Disabled Breakpoint"
1069
+ )),
1070
+ };
1071
+ }
1072
+ const appendMessage = (text) => {
1073
+ return ('message' in breakpoint$1 && breakpoint$1.message) ? text.concat(', ' + breakpoint$1.message) : text;
1074
+ };
1075
+ if (debugActive && !breakpoint$1.verified) {
1076
+ return {
1077
+ icon: breakpointIcon.unverified,
1078
+ message: ('message' in breakpoint$1 && breakpoint$1.message) ? breakpoint$1.message : (breakpoint$1.logMessage ? ( localizeWithPath(
1079
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1080
+ 'unverifiedLogpoint',
1081
+ "Unverified Logpoint"
1082
+ )) : ( localizeWithPath(
1083
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1084
+ 'unverifiedBreakpoint',
1085
+ "Unverified Breakpoint"
1086
+ ))),
1087
+ showAdapterUnverifiedMessage: true
1088
+ };
1089
+ }
1090
+ if (breakpoint$1 instanceof DataBreakpoint) {
1091
+ if (!breakpoint$1.supported) {
1092
+ return {
1093
+ icon: breakpointIcon.unverified,
1094
+ message: ( localizeWithPath(
1095
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1096
+ 'dataBreakpointUnsupported',
1097
+ "Data breakpoints not supported by this debug type"
1098
+ )),
1099
+ };
1100
+ }
1101
+ return {
1102
+ icon: breakpointIcon.regular,
1103
+ message: breakpoint$1.message || ( localizeWithPath(
1104
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1105
+ 'dataBreakpoint',
1106
+ "Data Breakpoint"
1107
+ ))
1108
+ };
1109
+ }
1110
+ if (breakpoint$1 instanceof FunctionBreakpoint) {
1111
+ if (!breakpoint$1.supported) {
1112
+ return {
1113
+ icon: breakpointIcon.unverified,
1114
+ message: ( localizeWithPath(
1115
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1116
+ 'functionBreakpointUnsupported',
1117
+ "Function breakpoints not supported by this debug type"
1118
+ )),
1119
+ };
1120
+ }
1121
+ const messages = [];
1122
+ messages.push(breakpoint$1.message || ( localizeWithPath(
1123
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1124
+ 'functionBreakpoint',
1125
+ "Function Breakpoint"
1126
+ )));
1127
+ if (breakpoint$1.condition) {
1128
+ messages.push(( localizeWithPath(
1129
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1130
+ 'expression',
1131
+ "Condition: {0}",
1132
+ breakpoint$1.condition
1133
+ )));
1134
+ }
1135
+ if (breakpoint$1.hitCondition) {
1136
+ messages.push(( localizeWithPath(
1137
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1138
+ 'hitCount',
1139
+ "Hit Count: {0}",
1140
+ breakpoint$1.hitCondition
1141
+ )));
1142
+ }
1143
+ return {
1144
+ icon: breakpointIcon.regular,
1145
+ message: appendMessage(messages.join('\n'))
1146
+ };
1147
+ }
1148
+ if (breakpoint$1 instanceof InstructionBreakpoint) {
1149
+ if (!breakpoint$1.supported) {
1150
+ return {
1151
+ icon: breakpointIcon.unverified,
1152
+ message: ( localizeWithPath(
1153
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1154
+ 'instructionBreakpointUnsupported',
1155
+ "Instruction breakpoints not supported by this debug type"
1156
+ )),
1157
+ };
1158
+ }
1159
+ const messages = [];
1160
+ if (breakpoint$1.message) {
1161
+ messages.push(breakpoint$1.message);
1162
+ }
1163
+ else if (breakpoint$1.instructionReference) {
1164
+ messages.push(( localizeWithPath(
1165
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1166
+ 'instructionBreakpointAtAddress',
1167
+ "Instruction breakpoint at address {0}",
1168
+ breakpoint$1.instructionReference
1169
+ )));
1170
+ }
1171
+ else {
1172
+ messages.push(( localizeWithPath(
1173
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1174
+ 'instructionBreakpoint',
1175
+ "Instruction breakpoint"
1176
+ )));
1177
+ }
1178
+ if (breakpoint$1.hitCondition) {
1179
+ messages.push(( localizeWithPath(
1180
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1181
+ 'hitCount',
1182
+ "Hit Count: {0}",
1183
+ breakpoint$1.hitCondition
1184
+ )));
1185
+ }
1186
+ return {
1187
+ icon: breakpointIcon.regular,
1188
+ message: appendMessage(messages.join('\n'))
1189
+ };
1190
+ }
1191
+ if (breakpoint$1.logMessage || breakpoint$1.condition || breakpoint$1.hitCondition) {
1192
+ const messages = [];
1193
+ if (!breakpoint$1.supported) {
1194
+ return {
1195
+ icon: debugBreakpointUnsupported,
1196
+ message: ( localizeWithPath(
1197
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1198
+ 'breakpointUnsupported',
1199
+ "Breakpoints of this type are not supported by the debugger"
1200
+ )),
1201
+ };
1202
+ }
1203
+ if (breakpoint$1.logMessage) {
1204
+ messages.push(( localizeWithPath(
1205
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1206
+ 'logMessage',
1207
+ "Log Message: {0}",
1208
+ breakpoint$1.logMessage
1209
+ )));
1210
+ }
1211
+ if (breakpoint$1.condition) {
1212
+ messages.push(( localizeWithPath(
1213
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1214
+ 'expression',
1215
+ "Condition: {0}",
1216
+ breakpoint$1.condition
1217
+ )));
1218
+ }
1219
+ if (breakpoint$1.hitCondition) {
1220
+ messages.push(( localizeWithPath(
1221
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1222
+ 'hitCount',
1223
+ "Hit Count: {0}",
1224
+ breakpoint$1.hitCondition
1225
+ )));
1226
+ }
1227
+ return {
1228
+ icon: breakpoint$1.logMessage ? logBreakpoint.regular : conditionalBreakpoint.regular,
1229
+ message: appendMessage(messages.join('\n'))
1230
+ };
1231
+ }
1232
+ const message = ('message' in breakpoint$1 && breakpoint$1.message) ? breakpoint$1.message : breakpoint$1 instanceof Breakpoint && labelService ? labelService.getUriLabel(breakpoint$1.uri) : ( localizeWithPath(
1233
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1234
+ 'breakpoint',
1235
+ "Breakpoint"
1236
+ ));
1237
+ return {
1238
+ icon: breakpointIcon.regular,
1239
+ message
1240
+ };
1241
+ }
1242
+ registerAction2(class extends Action2 {
1243
+ constructor() {
1244
+ super({
1245
+ id: 'workbench.debug.viewlet.action.addFunctionBreakpointAction',
1246
+ title: {
1247
+ value: ( localizeWithPath(
1248
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1249
+ 'addFunctionBreakpoint',
1250
+ "Add Function Breakpoint"
1251
+ )),
1252
+ original: 'Add Function Breakpoint',
1253
+ mnemonicTitle: ( localizeWithPath(
1254
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1255
+ { key: 'miFunctionBreakpoint', comment: ['&& denotes a mnemonic'] },
1256
+ "&&Function Breakpoint..."
1257
+ ))
1258
+ },
1259
+ f1: true,
1260
+ icon: watchExpressionsAddFuncBreakpoint,
1261
+ menu: [{
1262
+ id: MenuId.ViewTitle,
1263
+ group: 'navigation',
1264
+ order: 10,
1265
+ when: ( ContextKeyExpr.equals('view', BREAKPOINTS_VIEW_ID))
1266
+ }, {
1267
+ id: MenuId.MenubarNewBreakpointMenu,
1268
+ group: '1_breakpoints',
1269
+ order: 3,
1270
+ when: CONTEXT_DEBUGGERS_AVAILABLE
1271
+ }]
1272
+ });
1273
+ }
1274
+ run(accessor) {
1275
+ const debugService = accessor.get(IDebugService);
1276
+ debugService.addFunctionBreakpoint();
1277
+ }
1278
+ });
1279
+ registerAction2(class extends Action2 {
1280
+ constructor() {
1281
+ super({
1282
+ id: 'workbench.debug.viewlet.action.toggleBreakpointsActivatedAction',
1283
+ title: { value: ( localizeWithPath(
1284
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1285
+ 'activateBreakpoints',
1286
+ "Toggle Activate Breakpoints"
1287
+ )), original: 'Toggle Activate Breakpoints' },
1288
+ f1: true,
1289
+ icon: breakpointsActivate,
1290
+ menu: {
1291
+ id: MenuId.ViewTitle,
1292
+ group: 'navigation',
1293
+ order: 20,
1294
+ when: ( ContextKeyExpr.equals('view', BREAKPOINTS_VIEW_ID))
1295
+ }
1296
+ });
1297
+ }
1298
+ run(accessor) {
1299
+ const debugService = accessor.get(IDebugService);
1300
+ debugService.setBreakpointsActivated(!debugService.getModel().areBreakpointsActivated());
1301
+ }
1302
+ });
1303
+ registerAction2(class extends Action2 {
1304
+ constructor() {
1305
+ super({
1306
+ id: 'workbench.debug.viewlet.action.removeBreakpoint',
1307
+ title: ( localizeWithPath(
1308
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1309
+ 'removeBreakpoint',
1310
+ "Remove Breakpoint"
1311
+ )),
1312
+ icon: Codicon.removeClose,
1313
+ menu: [{
1314
+ id: MenuId.DebugBreakpointsContext,
1315
+ group: '3_modification',
1316
+ order: 10,
1317
+ when: ( CONTEXT_BREAKPOINT_ITEM_TYPE.notEqualsTo('exceptionBreakpoint'))
1318
+ }, {
1319
+ id: MenuId.DebugBreakpointsContext,
1320
+ group: 'inline',
1321
+ order: 20,
1322
+ when: ( CONTEXT_BREAKPOINT_ITEM_TYPE.notEqualsTo('exceptionBreakpoint'))
1323
+ }]
1324
+ });
1325
+ }
1326
+ async run(accessor, breakpoint) {
1327
+ const debugService = accessor.get(IDebugService);
1328
+ if (breakpoint instanceof Breakpoint) {
1329
+ await debugService.removeBreakpoints(breakpoint.getId());
1330
+ }
1331
+ else if (breakpoint instanceof FunctionBreakpoint) {
1332
+ await debugService.removeFunctionBreakpoints(breakpoint.getId());
1333
+ }
1334
+ else if (breakpoint instanceof DataBreakpoint) {
1335
+ await debugService.removeDataBreakpoints(breakpoint.getId());
1336
+ }
1337
+ else if (breakpoint instanceof InstructionBreakpoint) {
1338
+ await debugService.removeInstructionBreakpoints(breakpoint.instructionReference);
1339
+ }
1340
+ }
1341
+ });
1342
+ registerAction2(class extends Action2 {
1343
+ constructor() {
1344
+ super({
1345
+ id: 'workbench.debug.viewlet.action.removeAllBreakpoints',
1346
+ title: {
1347
+ original: 'Remove All Breakpoints',
1348
+ value: ( localizeWithPath(
1349
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1350
+ 'removeAllBreakpoints',
1351
+ "Remove All Breakpoints"
1352
+ )),
1353
+ mnemonicTitle: ( localizeWithPath(
1354
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1355
+ { key: 'miRemoveAllBreakpoints', comment: ['&& denotes a mnemonic'] },
1356
+ "Remove &&All Breakpoints"
1357
+ ))
1358
+ },
1359
+ f1: true,
1360
+ icon: breakpointsRemoveAll,
1361
+ menu: [{
1362
+ id: MenuId.ViewTitle,
1363
+ group: 'navigation',
1364
+ order: 30,
1365
+ when: ( ContextKeyExpr.equals('view', BREAKPOINTS_VIEW_ID))
1366
+ }, {
1367
+ id: MenuId.DebugBreakpointsContext,
1368
+ group: '3_modification',
1369
+ order: 20,
1370
+ when: ( ContextKeyExpr.and(CONTEXT_BREAKPOINTS_EXIST, ( CONTEXT_BREAKPOINT_ITEM_TYPE.notEqualsTo('exceptionBreakpoint'))))
1371
+ }, {
1372
+ id: MenuId.MenubarDebugMenu,
1373
+ group: '5_breakpoints',
1374
+ order: 3,
1375
+ when: CONTEXT_DEBUGGERS_AVAILABLE
1376
+ }]
1377
+ });
1378
+ }
1379
+ run(accessor) {
1380
+ const debugService = accessor.get(IDebugService);
1381
+ debugService.removeBreakpoints();
1382
+ debugService.removeFunctionBreakpoints();
1383
+ debugService.removeDataBreakpoints();
1384
+ debugService.removeInstructionBreakpoints();
1385
+ }
1386
+ });
1387
+ registerAction2(class extends Action2 {
1388
+ constructor() {
1389
+ super({
1390
+ id: 'workbench.debug.viewlet.action.enableAllBreakpoints',
1391
+ title: {
1392
+ original: 'Enable All Breakpoints',
1393
+ value: ( localizeWithPath(
1394
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1395
+ 'enableAllBreakpoints',
1396
+ "Enable All Breakpoints"
1397
+ )),
1398
+ mnemonicTitle: ( localizeWithPath(
1399
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1400
+ { key: 'miEnableAllBreakpoints', comment: ['&& denotes a mnemonic'] },
1401
+ "&&Enable All Breakpoints"
1402
+ )),
1403
+ },
1404
+ f1: true,
1405
+ precondition: CONTEXT_DEBUGGERS_AVAILABLE,
1406
+ menu: [{
1407
+ id: MenuId.DebugBreakpointsContext,
1408
+ group: 'z_commands',
1409
+ order: 10,
1410
+ when: ( ContextKeyExpr.and(CONTEXT_BREAKPOINTS_EXIST, ( CONTEXT_BREAKPOINT_ITEM_TYPE.notEqualsTo('exceptionBreakpoint'))))
1411
+ }, {
1412
+ id: MenuId.MenubarDebugMenu,
1413
+ group: '5_breakpoints',
1414
+ order: 1,
1415
+ when: CONTEXT_DEBUGGERS_AVAILABLE
1416
+ }]
1417
+ });
1418
+ }
1419
+ async run(accessor) {
1420
+ const debugService = accessor.get(IDebugService);
1421
+ await debugService.enableOrDisableBreakpoints(true);
1422
+ }
1423
+ });
1424
+ registerAction2(class extends Action2 {
1425
+ constructor() {
1426
+ super({
1427
+ id: 'workbench.debug.viewlet.action.disableAllBreakpoints',
1428
+ title: {
1429
+ original: 'Disable All Breakpoints',
1430
+ value: ( localizeWithPath(
1431
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1432
+ 'disableAllBreakpoints',
1433
+ "Disable All Breakpoints"
1434
+ )),
1435
+ mnemonicTitle: ( localizeWithPath(
1436
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1437
+ { key: 'miDisableAllBreakpoints', comment: ['&& denotes a mnemonic'] },
1438
+ "Disable A&&ll Breakpoints"
1439
+ ))
1440
+ },
1441
+ f1: true,
1442
+ precondition: CONTEXT_DEBUGGERS_AVAILABLE,
1443
+ menu: [{
1444
+ id: MenuId.DebugBreakpointsContext,
1445
+ group: 'z_commands',
1446
+ order: 20,
1447
+ when: ( ContextKeyExpr.and(CONTEXT_BREAKPOINTS_EXIST, ( CONTEXT_BREAKPOINT_ITEM_TYPE.notEqualsTo('exceptionBreakpoint'))))
1448
+ }, {
1449
+ id: MenuId.MenubarDebugMenu,
1450
+ group: '5_breakpoints',
1451
+ order: 2,
1452
+ when: CONTEXT_DEBUGGERS_AVAILABLE
1453
+ }]
1454
+ });
1455
+ }
1456
+ async run(accessor) {
1457
+ const debugService = accessor.get(IDebugService);
1458
+ await debugService.enableOrDisableBreakpoints(false);
1459
+ }
1460
+ });
1461
+ registerAction2(class extends Action2 {
1462
+ constructor() {
1463
+ super({
1464
+ id: 'workbench.debug.viewlet.action.reapplyBreakpointsAction',
1465
+ title: { value: ( localizeWithPath(
1466
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1467
+ 'reapplyAllBreakpoints',
1468
+ "Reapply All Breakpoints"
1469
+ )), original: 'Reapply All Breakpoints' },
1470
+ f1: true,
1471
+ precondition: CONTEXT_IN_DEBUG_MODE,
1472
+ menu: [{
1473
+ id: MenuId.DebugBreakpointsContext,
1474
+ group: 'z_commands',
1475
+ order: 30,
1476
+ when: ( ContextKeyExpr.and(CONTEXT_BREAKPOINTS_EXIST, ( CONTEXT_BREAKPOINT_ITEM_TYPE.notEqualsTo('exceptionBreakpoint'))))
1477
+ }]
1478
+ });
1479
+ }
1480
+ async run(accessor) {
1481
+ const debugService = accessor.get(IDebugService);
1482
+ await debugService.setBreakpointsActivated(true);
1483
+ }
1484
+ });
1485
+ registerAction2(class extends ViewAction {
1486
+ constructor() {
1487
+ super({
1488
+ id: 'debug.editBreakpoint',
1489
+ viewId: BREAKPOINTS_VIEW_ID,
1490
+ title: ( localizeWithPath(
1491
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1492
+ 'editCondition',
1493
+ "Edit Condition..."
1494
+ )),
1495
+ icon: Codicon.edit,
1496
+ precondition: CONTEXT_BREAKPOINT_SUPPORTS_CONDITION,
1497
+ menu: [{
1498
+ id: MenuId.DebugBreakpointsContext,
1499
+ group: 'navigation',
1500
+ order: 10
1501
+ }, {
1502
+ id: MenuId.DebugBreakpointsContext,
1503
+ group: 'inline',
1504
+ order: 10
1505
+ }]
1506
+ });
1507
+ }
1508
+ async runInView(accessor, view, breakpoint) {
1509
+ const debugService = accessor.get(IDebugService);
1510
+ const editorService = accessor.get(IEditorService);
1511
+ if (breakpoint instanceof Breakpoint) {
1512
+ const editor = await openBreakpointSource(breakpoint, false, false, true, debugService, editorService);
1513
+ if (editor) {
1514
+ const codeEditor = editor.getControl();
1515
+ if (isCodeEditor(codeEditor)) {
1516
+ codeEditor.getContribution(BREAKPOINT_EDITOR_CONTRIBUTION_ID)?.showBreakpointWidget(breakpoint.lineNumber, breakpoint.column);
1517
+ }
1518
+ }
1519
+ }
1520
+ else if (breakpoint instanceof FunctionBreakpoint) {
1521
+ const contextMenuService = accessor.get(IContextMenuService);
1522
+ const actions = [( new Action('breakpoint.editCondition', ( localizeWithPath(
1523
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1524
+ 'editCondition',
1525
+ "Edit Condition..."
1526
+ )), undefined, true, async () => view.renderInputBox({ breakpoint, type: 'condition' }))),
1527
+ ( new Action('breakpoint.editCondition', ( localizeWithPath(
1528
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1529
+ 'editHitCount',
1530
+ "Edit Hit Count..."
1531
+ )), undefined, true, async () => view.renderInputBox({ breakpoint, type: 'hitCount' })))];
1532
+ const domNode = breakpointIdToActionBarDomeNode.get(breakpoint.getId());
1533
+ if (domNode) {
1534
+ contextMenuService.showContextMenu({
1535
+ getActions: () => actions,
1536
+ getAnchor: () => domNode,
1537
+ onHide: () => dispose(actions)
1538
+ });
1539
+ }
1540
+ }
1541
+ else {
1542
+ view.renderInputBox({ breakpoint, type: 'condition' });
1543
+ }
1544
+ }
1545
+ });
1546
+ registerAction2(class extends ViewAction {
1547
+ constructor() {
1548
+ super({
1549
+ id: 'debug.editFunctionBreakpoint',
1550
+ viewId: BREAKPOINTS_VIEW_ID,
1551
+ title: ( localizeWithPath(
1552
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1553
+ 'editBreakpoint',
1554
+ "Edit Function Breakpoint..."
1555
+ )),
1556
+ menu: [{
1557
+ id: MenuId.DebugBreakpointsContext,
1558
+ group: '1_breakpoints',
1559
+ order: 10,
1560
+ when: ( CONTEXT_BREAKPOINT_ITEM_TYPE.isEqualTo('functionBreakpoint'))
1561
+ }]
1562
+ });
1563
+ }
1564
+ runInView(_accessor, view, breakpoint) {
1565
+ view.renderInputBox({ breakpoint, type: 'name' });
1566
+ }
1567
+ });
1568
+ registerAction2(class extends ViewAction {
1569
+ constructor() {
1570
+ super({
1571
+ id: 'debug.editFunctionBreakpointHitCount',
1572
+ viewId: BREAKPOINTS_VIEW_ID,
1573
+ title: ( localizeWithPath(
1574
+ 'vs/workbench/contrib/debug/browser/breakpointsView',
1575
+ 'editHitCount',
1576
+ "Edit Hit Count..."
1577
+ )),
1578
+ precondition: CONTEXT_BREAKPOINT_SUPPORTS_CONDITION,
1579
+ menu: [{
1580
+ id: MenuId.DebugBreakpointsContext,
1581
+ group: 'navigation',
1582
+ order: 20,
1583
+ when: ( ContextKeyExpr.or(( CONTEXT_BREAKPOINT_ITEM_TYPE.isEqualTo('functionBreakpoint')), ( CONTEXT_BREAKPOINT_ITEM_TYPE.isEqualTo('dataBreakpoint'))))
1584
+ }]
1585
+ });
1586
+ }
1587
+ runInView(_accessor, view, breakpoint) {
1588
+ view.renderInputBox({ breakpoint, type: 'hitCount' });
1589
+ }
1590
+ });
1591
+ export { BreakpointsView, getBreakpointMessageAndIcon, getExpandedBodySize, openBreakpointSource };