@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.
- package/README.md +19 -10
- package/contributions.js +1 -0
- package/missing-services.js +91 -5
- package/monaco-editor-treemending.patch +2540 -2533
- package/package.json +6 -6
- package/vscode/src/vs/base/common/jsonFormatter.js +8 -1
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +128 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +2 -1
- package/vscode/src/vs/platform/layout/browser/zIndexRegistry.js +58 -0
- package/vscode/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.js +56 -1
- package/vscode/src/vs/workbench/browser/actions/layoutActions.js +186 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +191 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +238 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +75 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +205 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorInput.js +168 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatFollowups.js +35 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +340 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +1195 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +115 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOptions.js +81 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommandContentWidget.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommandContentWidget.js +62 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +583 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.js +290 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables.js +167 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chat.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +6 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +562 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatParserTypes.js +31 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatProvider.js +24 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatRequestParser.js +193 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService.js +22 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +52 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatViewModel.js +258 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.js +37 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatWordCounter.js +25 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +388 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +61 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentFormActions.js +49 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +647 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +300 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadAdditionalActions.js +60 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +249 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +107 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +333 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/media/review.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +99 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/timestamp.js +55 -0
- package/vscode/src/vs/workbench/contrib/comments/common/commentsConfiguration.js +2 -0
- package/vscode/src/vs/workbench/contrib/contextmenu/browser/contextmenu.contribution.js +20 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +855 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +410 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +1591 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +178 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/media/breakpointWidget.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/media/callStackEditorContribution.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +1485 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugSource.js +125 -0
- package/vscode/src/vs/workbench/contrib/debug/common/disassemblyViewInput.js +29 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionsInput.js +41 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionsUtils.js +102 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +988 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatLivePreviewWidget.js +431 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +417 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +806 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +915 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +19 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +129 -10
- package/vscode/src/vs/workbench/contrib/markdown/browser/markdownDocumentRenderer.js +205 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +150 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +480 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController.js +5 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/diffComputer.js +90 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/editing.js +54 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/lineRange.js +108 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mapping.js +258 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +614 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange.js +307 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/rangeUtils.js +44 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +165 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/telemetry.js +78 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/utils.js +169 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +64 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/cellOutputClipboard.js +49 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findFilters.js +70 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js +120 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findModel.js +416 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +663 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +593 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +72 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.js +326 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +539 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.js +265 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +348 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebook.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellChat.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellEditorHint.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellInsertToolbar.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellOutput.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellStatusBar.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellTitleToolbar.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookDnd.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookEditorStickyScroll.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFocusIndicator.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFolding.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookKernelActionViewItem.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookOutline.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookToolbar.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookBrowser.js +95 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +437 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorExtensions.js +29 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +2730 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.js +139 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookLogger.js +17 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.js +564 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookViewEvents.js +27 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellPart.js +119 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.js +27 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.js +135 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.js +178 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDecorations.js +35 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.js +377 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDragRenderer.js +97 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +194 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellExecution.js +71 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocus.js +20 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocusIndicator.js +85 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.js +652 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellProgressBar.js +59 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.js +303 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbarStickyScroll.js +24 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.js +228 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatActions.js +302 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatController.js +438 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatPart.js +45 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +435 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.js +95 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.js +107 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellInput.js +29 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput.js +59 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.js +67 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.js +430 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellAnchor.js +54 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.js +1131 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellListView.js +21 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +1591 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.js +341 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.js +2155 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewThemeMapping.js +65 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/OutlineEntry.js +95 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.js +507 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellEditorOptions.js +85 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputViewModel.js +47 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellSelectionCollection.js +40 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.js +435 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/eventDispatcher.js +31 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/foldingModel.js +257 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel.js +239 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +103 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineProvider.js +211 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.js +808 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/viewContext.js +8 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +381 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.js +527 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorWidgetContextKeys.js +163 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.js +651 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.js +173 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookOverviewRuler.js +98 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.js +62 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellOutputTextModel.js +101 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.js +346 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +152 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookContextKeys.js +39 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.js +296 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +261 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionService.js +3 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookKernelService.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookKeymapService.js +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookLoggingService.js +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookPerformance.js +16 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookRange.js +66 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookWorkerService.js +4 -0
- package/vscode/src/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +130 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/media/tunnelView.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +847 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteIcons.js +89 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +1942 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/urlFinder.js +107 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsBase.js +49 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsFind.js +387 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/search/common/constants.js +66 -0
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/constants.js +11 -0
- package/vscode/src/vs/workbench/contrib/snippets/browser/commands/abstractSnippetsActions.js +24 -0
- package/vscode/src/vs/workbench/contrib/snippets/browser/commands/fileTemplateSnippets.js +95 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.js +4 -1
- package/vscode/src/vs/workbench/contrib/terminal/common/terminal.js +2 -1
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/featuredExtensionService.js +159 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedExtensionPoint.js +375 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.js +563 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.js +932 -0
- package/vscode/src/vs/workbench/services/layout/browser/layoutService.js +15 -1
- package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.d.ts +2 -2
- package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.js +190 -2
- package/vscode/src/vs/workbench/services/workingCopy/common/resourceWorkingCopy.js +77 -0
- package/assets/break.mp3 +0 -0
- package/assets/chatRequestSent.mp3 +0 -0
- package/assets/chatResponsePending.mp3 +0 -0
- package/assets/chatResponseReceived1.mp3 +0 -0
- package/assets/chatResponseReceived2.mp3 +0 -0
- package/assets/chatResponseReceived3.mp3 +0 -0
- package/assets/chatResponseReceived4.mp3 +0 -0
- package/assets/clear.mp3 +0 -0
- package/assets/defaultIcon.png +0 -0
- package/assets/diffLineDeleted.mp3 +0 -0
- package/assets/diffLineInserted.mp3 +0 -0
- package/assets/diffLineModified.mp3 +0 -0
- package/assets/error.mp3 +0 -0
- package/assets/fake.html +0 -10
- package/assets/foldedAreas.mp3 +0 -0
- package/assets/format.mp3 +0 -0
- package/assets/index-no-csp.html +0 -1226
- package/assets/index.html +0 -1227
- package/assets/quickFixes.mp3 +0 -0
- package/assets/save.mp3 +0 -0
- package/assets/service-worker.js +0 -457
- package/assets/taskCompleted.mp3 +0 -0
- package/assets/taskFailed.mp3 +0 -0
- package/assets/terminalBell.mp3 +0 -0
- package/assets/warning.mp3 +0 -0
- package/assets/webWorkerExtensionHostIframe.html +0 -123
- package/override/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js +0 -2
- package/override/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +0 -2
- package/override/vs/workbench/contrib/notebook/common/notebookEditorInput.js +0 -5
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import './media/breakpointWidget.css.js';
|
|
3
|
+
import * as nls from 'monaco-editor/esm/vs/nls.js';
|
|
4
|
+
import { SelectBox } from 'monaco-editor/esm/vs/base/browser/ui/selectBox/selectBox.js';
|
|
5
|
+
import * as lifecycle from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
6
|
+
import * as dom from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
7
|
+
import { Position } from 'monaco-editor/esm/vs/editor/common/core/position.js';
|
|
8
|
+
import { ZoneWidget } from 'monaco-editor/esm/vs/editor/contrib/zoneWidget/browser/zoneWidget.js';
|
|
9
|
+
import { IContextViewService } from 'monaco-editor/esm/vs/platform/contextview/browser/contextView.js';
|
|
10
|
+
import { CONTEXT_BREAKPOINT_WIDGET_VISIBLE, CONTEXT_IN_BREAKPOINT_WIDGET, BREAKPOINT_EDITOR_CONTRIBUTION_ID, DEBUG_SCHEME, IDebugService } from '../common/debug.js';
|
|
11
|
+
import { IThemeService } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
|
|
12
|
+
import { createDecorator, IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
13
|
+
import { IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
|
|
14
|
+
import { EditorCommand, registerEditorCommand } from 'monaco-editor/esm/vs/editor/browser/editorExtensions.js';
|
|
15
|
+
import { EditorContextKeys } from 'monaco-editor/esm/vs/editor/common/editorContextKeys.js';
|
|
16
|
+
import { IModelService } from 'monaco-editor/esm/vs/editor/common/services/model.js';
|
|
17
|
+
import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
18
|
+
import { provideSuggestionItems, CompletionOptions } from 'monaco-editor/esm/vs/editor/contrib/suggest/browser/suggest.js';
|
|
19
|
+
import { ICodeEditorService } from 'monaco-editor/esm/vs/editor/browser/services/codeEditorService.js';
|
|
20
|
+
import { editorForeground } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
|
|
21
|
+
import { ServiceCollection } from 'monaco-editor/esm/vs/platform/instantiation/common/serviceCollection.js';
|
|
22
|
+
import { CodeEditorWidget } from 'monaco-editor/esm/vs/editor/browser/widget/codeEditorWidget.js';
|
|
23
|
+
import { getSimpleCodeEditorWidgetOptions, getSimpleEditorOptions } from '../../codeEditor/browser/simpleEditorOptions.js';
|
|
24
|
+
import { Range } from 'monaco-editor/esm/vs/editor/common/core/range.js';
|
|
25
|
+
import { onUnexpectedError } from 'monaco-editor/esm/vs/base/common/errors.js';
|
|
26
|
+
import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
|
|
27
|
+
import { PLAINTEXT_LANGUAGE_ID } from 'monaco-editor/esm/vs/editor/common/languages/modesRegistry.js';
|
|
28
|
+
import { ILanguageFeaturesService } from 'monaco-editor/esm/vs/editor/common/services/languageFeatures.js';
|
|
29
|
+
import { defaultSelectBoxStyles } from 'monaco-editor/esm/vs/platform/theme/browser/defaultStyles.js';
|
|
30
|
+
import { IKeybindingService } from 'monaco-editor/esm/vs/platform/keybinding/common/keybinding.js';
|
|
31
|
+
const $ = dom.$;
|
|
32
|
+
const IPrivateBreakpointWidgetService = ( (createDecorator('privateBreakpointWidgetService')));
|
|
33
|
+
const DECORATION_KEY = 'breakpointwidgetdecoration';
|
|
34
|
+
function isPositionInCurlyBracketBlock(input) {
|
|
35
|
+
const model = input.getModel();
|
|
36
|
+
const bracketPairs = model.bracketPairs.getBracketPairsInRange(Range.fromPositions(input.getPosition()));
|
|
37
|
+
return (
|
|
38
|
+
(bracketPairs.some(p => p.openingBracketInfo.bracketText === '{'))
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
function createDecorations(theme, placeHolder) {
|
|
42
|
+
const transparentForeground = theme.getColor(editorForeground)?.transparent(0.4);
|
|
43
|
+
return [{
|
|
44
|
+
range: {
|
|
45
|
+
startLineNumber: 0,
|
|
46
|
+
endLineNumber: 0,
|
|
47
|
+
startColumn: 0,
|
|
48
|
+
endColumn: 1
|
|
49
|
+
},
|
|
50
|
+
renderOptions: {
|
|
51
|
+
after: {
|
|
52
|
+
contentText: placeHolder,
|
|
53
|
+
color: transparentForeground ? ( (transparentForeground.toString())) : undefined
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}];
|
|
57
|
+
}
|
|
58
|
+
let BreakpointWidget = class BreakpointWidget extends ZoneWidget {
|
|
59
|
+
constructor(editor, lineNumber, column, context, contextViewService, debugService, themeService, contextKeyService, instantiationService, modelService, codeEditorService, _configurationService, languageFeaturesService, keybindingService) {
|
|
60
|
+
super(editor, { showFrame: true, showArrow: false, frameWidth: 1, isAccessible: true });
|
|
61
|
+
this.lineNumber = lineNumber;
|
|
62
|
+
this.column = column;
|
|
63
|
+
this.contextViewService = contextViewService;
|
|
64
|
+
this.debugService = debugService;
|
|
65
|
+
this.themeService = themeService;
|
|
66
|
+
this.contextKeyService = contextKeyService;
|
|
67
|
+
this.instantiationService = instantiationService;
|
|
68
|
+
this.modelService = modelService;
|
|
69
|
+
this.codeEditorService = codeEditorService;
|
|
70
|
+
this._configurationService = _configurationService;
|
|
71
|
+
this.languageFeaturesService = languageFeaturesService;
|
|
72
|
+
this.keybindingService = keybindingService;
|
|
73
|
+
this.conditionInput = '';
|
|
74
|
+
this.hitCountInput = '';
|
|
75
|
+
this.logMessageInput = '';
|
|
76
|
+
this.toDispose = [];
|
|
77
|
+
const model = this.editor.getModel();
|
|
78
|
+
if (model) {
|
|
79
|
+
const uri = model.uri;
|
|
80
|
+
const breakpoints = this.debugService.getModel().getBreakpoints({ lineNumber: this.lineNumber, column: this.column, uri });
|
|
81
|
+
this.breakpoint = breakpoints.length ? breakpoints[0] : undefined;
|
|
82
|
+
}
|
|
83
|
+
if (context === undefined) {
|
|
84
|
+
if (this.breakpoint && !this.breakpoint.condition && !this.breakpoint.hitCondition && this.breakpoint.logMessage) {
|
|
85
|
+
this.context = 2 ;
|
|
86
|
+
}
|
|
87
|
+
else if (this.breakpoint && !this.breakpoint.condition && this.breakpoint.hitCondition) {
|
|
88
|
+
this.context = 1 ;
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
this.context = 0 ;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
this.context = context;
|
|
96
|
+
}
|
|
97
|
+
this.toDispose.push(this.debugService.getModel().onDidChangeBreakpoints(e => {
|
|
98
|
+
if (this.breakpoint && e && e.removed && e.removed.indexOf(this.breakpoint) >= 0) {
|
|
99
|
+
this.dispose();
|
|
100
|
+
}
|
|
101
|
+
}));
|
|
102
|
+
this.codeEditorService.registerDecorationType('breakpoint-widget', DECORATION_KEY, {});
|
|
103
|
+
this.create();
|
|
104
|
+
}
|
|
105
|
+
get placeholder() {
|
|
106
|
+
const acceptString = this.keybindingService.lookupKeybinding(AcceptBreakpointWidgetInputAction.ID)?.getLabel() || 'Enter';
|
|
107
|
+
const closeString = this.keybindingService.lookupKeybinding(CloseBreakpointWidgetCommand.ID)?.getLabel() || 'Escape';
|
|
108
|
+
switch (this.context) {
|
|
109
|
+
case 2 :
|
|
110
|
+
return (
|
|
111
|
+
(nls.localizeWithPath(
|
|
112
|
+
'vs/workbench/contrib/debug/browser/breakpointWidget',
|
|
113
|
+
'breakpointWidgetLogMessagePlaceholder',
|
|
114
|
+
"Message to log when breakpoint is hit. Expressions within {} are interpolated. '{0}' to accept, '{1}' to cancel.",
|
|
115
|
+
acceptString,
|
|
116
|
+
closeString
|
|
117
|
+
))
|
|
118
|
+
);
|
|
119
|
+
case 1 :
|
|
120
|
+
return (
|
|
121
|
+
(nls.localizeWithPath(
|
|
122
|
+
'vs/workbench/contrib/debug/browser/breakpointWidget',
|
|
123
|
+
'breakpointWidgetHitCountPlaceholder',
|
|
124
|
+
"Break when hit count condition is met. '{0}' to accept, '{1}' to cancel.",
|
|
125
|
+
acceptString,
|
|
126
|
+
closeString
|
|
127
|
+
))
|
|
128
|
+
);
|
|
129
|
+
default:
|
|
130
|
+
return (
|
|
131
|
+
(nls.localizeWithPath(
|
|
132
|
+
'vs/workbench/contrib/debug/browser/breakpointWidget',
|
|
133
|
+
'breakpointWidgetExpressionPlaceholder',
|
|
134
|
+
"Break when expression evaluates to true. '{0}' to accept, '{1}' to cancel.",
|
|
135
|
+
acceptString,
|
|
136
|
+
closeString
|
|
137
|
+
))
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
getInputValue(breakpoint) {
|
|
142
|
+
switch (this.context) {
|
|
143
|
+
case 2 :
|
|
144
|
+
return breakpoint && breakpoint.logMessage ? breakpoint.logMessage : this.logMessageInput;
|
|
145
|
+
case 1 :
|
|
146
|
+
return breakpoint && breakpoint.hitCondition ? breakpoint.hitCondition : this.hitCountInput;
|
|
147
|
+
default:
|
|
148
|
+
return breakpoint && breakpoint.condition ? breakpoint.condition : this.conditionInput;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
rememberInput() {
|
|
152
|
+
const value = this.input.getModel().getValue();
|
|
153
|
+
switch (this.context) {
|
|
154
|
+
case 2 :
|
|
155
|
+
this.logMessageInput = value;
|
|
156
|
+
break;
|
|
157
|
+
case 1 :
|
|
158
|
+
this.hitCountInput = value;
|
|
159
|
+
break;
|
|
160
|
+
default:
|
|
161
|
+
this.conditionInput = value;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
setInputMode() {
|
|
165
|
+
if (this.editor.hasModel()) {
|
|
166
|
+
const languageId = this.context === 2 ? PLAINTEXT_LANGUAGE_ID : this.editor.getModel().getLanguageId();
|
|
167
|
+
this.input.getModel().setLanguage(languageId);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
show(rangeOrPos) {
|
|
171
|
+
const lineNum = this.input.getModel().getLineCount();
|
|
172
|
+
super.show(rangeOrPos, lineNum + 1);
|
|
173
|
+
}
|
|
174
|
+
fitHeightToContent() {
|
|
175
|
+
const lineNum = this.input.getModel().getLineCount();
|
|
176
|
+
this._relayout(lineNum + 1);
|
|
177
|
+
}
|
|
178
|
+
_fillContainer(container) {
|
|
179
|
+
this.setCssClass('breakpoint-widget');
|
|
180
|
+
const selectBox = ( (new SelectBox([{ text: ( (nls.localizeWithPath(
|
|
181
|
+
'vs/workbench/contrib/debug/browser/breakpointWidget',
|
|
182
|
+
'expression',
|
|
183
|
+
"Expression"
|
|
184
|
+
))) }, { text: ( (nls.localizeWithPath(
|
|
185
|
+
'vs/workbench/contrib/debug/browser/breakpointWidget',
|
|
186
|
+
'hitCount',
|
|
187
|
+
"Hit Count"
|
|
188
|
+
))) }, { text: ( (nls.localizeWithPath(
|
|
189
|
+
'vs/workbench/contrib/debug/browser/breakpointWidget',
|
|
190
|
+
'logMessage',
|
|
191
|
+
"Log Message"
|
|
192
|
+
))) }], this.context, this.contextViewService, defaultSelectBoxStyles, { ariaLabel: ( (nls.localizeWithPath(
|
|
193
|
+
'vs/workbench/contrib/debug/browser/breakpointWidget',
|
|
194
|
+
'breakpointType',
|
|
195
|
+
'Breakpoint Type'
|
|
196
|
+
))) })));
|
|
197
|
+
this.selectContainer = $('.breakpoint-select-container');
|
|
198
|
+
selectBox.render(dom.append(container, this.selectContainer));
|
|
199
|
+
selectBox.onDidSelect(e => {
|
|
200
|
+
this.rememberInput();
|
|
201
|
+
this.context = e.index;
|
|
202
|
+
this.setInputMode();
|
|
203
|
+
const value = this.getInputValue(this.breakpoint);
|
|
204
|
+
this.input.getModel().setValue(value);
|
|
205
|
+
this.input.focus();
|
|
206
|
+
});
|
|
207
|
+
this.inputContainer = $('.inputContainer');
|
|
208
|
+
this.createBreakpointInput(dom.append(container, this.inputContainer));
|
|
209
|
+
this.input.getModel().setValue(this.getInputValue(this.breakpoint));
|
|
210
|
+
this.toDispose.push(this.input.getModel().onDidChangeContent(() => {
|
|
211
|
+
this.fitHeightToContent();
|
|
212
|
+
}));
|
|
213
|
+
this.input.setPosition({ lineNumber: 1, column: this.input.getModel().getLineMaxColumn(1) });
|
|
214
|
+
setTimeout(() => this.input.focus(), 150);
|
|
215
|
+
}
|
|
216
|
+
_doLayout(heightInPixel, widthInPixel) {
|
|
217
|
+
this.heightInPx = heightInPixel;
|
|
218
|
+
this.input.layout({ height: heightInPixel, width: widthInPixel - 113 });
|
|
219
|
+
this.centerInputVertically();
|
|
220
|
+
}
|
|
221
|
+
_onWidth(widthInPixel) {
|
|
222
|
+
if (typeof this.heightInPx === 'number') {
|
|
223
|
+
this._doLayout(this.heightInPx, widthInPixel);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
createBreakpointInput(container) {
|
|
227
|
+
const scopedContextKeyService = this.contextKeyService.createScoped(container);
|
|
228
|
+
this.toDispose.push(scopedContextKeyService);
|
|
229
|
+
const scopedInstatiationService = this.instantiationService.createChild(( (new ServiceCollection(
|
|
230
|
+
[IContextKeyService, scopedContextKeyService],
|
|
231
|
+
[IPrivateBreakpointWidgetService, this]
|
|
232
|
+
))));
|
|
233
|
+
const options = this.createEditorOptions();
|
|
234
|
+
const codeEditorWidgetOptions = getSimpleCodeEditorWidgetOptions();
|
|
235
|
+
this.input = scopedInstatiationService.createInstance(CodeEditorWidget, container, options, codeEditorWidgetOptions);
|
|
236
|
+
CONTEXT_IN_BREAKPOINT_WIDGET.bindTo(scopedContextKeyService).set(true);
|
|
237
|
+
const model = this.modelService.createModel('', null, ( URI.parse(`${DEBUG_SCHEME}:${this.editor.getId()}:breakpointinput`)), true);
|
|
238
|
+
if (this.editor.hasModel()) {
|
|
239
|
+
model.setLanguage(this.editor.getModel().getLanguageId());
|
|
240
|
+
}
|
|
241
|
+
this.input.setModel(model);
|
|
242
|
+
this.setInputMode();
|
|
243
|
+
this.toDispose.push(model);
|
|
244
|
+
const setDecorations = () => {
|
|
245
|
+
const value = this.input.getModel().getValue();
|
|
246
|
+
const decorations = !!value ? [] : createDecorations(this.themeService.getColorTheme(), this.placeholder);
|
|
247
|
+
this.input.setDecorationsByType('breakpoint-widget', DECORATION_KEY, decorations);
|
|
248
|
+
};
|
|
249
|
+
this.input.getModel().onDidChangeContent(() => setDecorations());
|
|
250
|
+
this.themeService.onDidColorThemeChange(() => setDecorations());
|
|
251
|
+
this.toDispose.push(this.languageFeaturesService.completionProvider.register({ scheme: DEBUG_SCHEME, hasAccessToAllModels: true }, {
|
|
252
|
+
_debugDisplayName: 'breakpointWidget',
|
|
253
|
+
provideCompletionItems: (model, position, _context, token) => {
|
|
254
|
+
let suggestionsPromise;
|
|
255
|
+
const underlyingModel = this.editor.getModel();
|
|
256
|
+
if (underlyingModel && (this.context === 0 || (this.context === 2 && isPositionInCurlyBracketBlock(this.input)))) {
|
|
257
|
+
suggestionsPromise = provideSuggestionItems(this.languageFeaturesService.completionProvider, underlyingModel, ( (new Position(this.lineNumber, 1))), ( (new CompletionOptions(
|
|
258
|
+
undefined,
|
|
259
|
+
( (new Set())).add(27 )
|
|
260
|
+
))), _context, token).then(suggestions => {
|
|
261
|
+
let overwriteBefore = 0;
|
|
262
|
+
if (this.context === 0 ) {
|
|
263
|
+
overwriteBefore = position.column - 1;
|
|
264
|
+
}
|
|
265
|
+
else {
|
|
266
|
+
const value = this.input.getModel().getValue();
|
|
267
|
+
while ((position.column - 2 - overwriteBefore >= 0) && value[position.column - 2 - overwriteBefore] !== '{' && value[position.column - 2 - overwriteBefore] !== ' ') {
|
|
268
|
+
overwriteBefore++;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
return {
|
|
272
|
+
suggestions: ( (suggestions.items.map(s => {
|
|
273
|
+
s.completion.range = Range.fromPositions(position.delta(0, -overwriteBefore), position);
|
|
274
|
+
return s.completion;
|
|
275
|
+
})))
|
|
276
|
+
};
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
else {
|
|
280
|
+
suggestionsPromise = Promise.resolve({ suggestions: [] });
|
|
281
|
+
}
|
|
282
|
+
return suggestionsPromise;
|
|
283
|
+
}
|
|
284
|
+
}));
|
|
285
|
+
this.toDispose.push(this._configurationService.onDidChangeConfiguration((e) => {
|
|
286
|
+
if (e.affectsConfiguration('editor.fontSize') || e.affectsConfiguration('editor.lineHeight')) {
|
|
287
|
+
this.input.updateOptions(this.createEditorOptions());
|
|
288
|
+
this.centerInputVertically();
|
|
289
|
+
}
|
|
290
|
+
}));
|
|
291
|
+
}
|
|
292
|
+
createEditorOptions() {
|
|
293
|
+
const editorConfig = this._configurationService.getValue('editor');
|
|
294
|
+
const options = getSimpleEditorOptions(this._configurationService);
|
|
295
|
+
options.fontSize = editorConfig.fontSize;
|
|
296
|
+
options.fontFamily = editorConfig.fontFamily;
|
|
297
|
+
options.lineHeight = editorConfig.lineHeight;
|
|
298
|
+
options.fontLigatures = editorConfig.fontLigatures;
|
|
299
|
+
options.ariaLabel = this.placeholder;
|
|
300
|
+
return options;
|
|
301
|
+
}
|
|
302
|
+
centerInputVertically() {
|
|
303
|
+
if (this.container && typeof this.heightInPx === 'number') {
|
|
304
|
+
const lineHeight = this.input.getOption(66 );
|
|
305
|
+
const lineNum = this.input.getModel().getLineCount();
|
|
306
|
+
const newTopMargin = (this.heightInPx - lineNum * lineHeight) / 2;
|
|
307
|
+
this.inputContainer.style.marginTop = newTopMargin + 'px';
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
close(success) {
|
|
311
|
+
if (success) {
|
|
312
|
+
let condition = this.breakpoint && this.breakpoint.condition;
|
|
313
|
+
let hitCondition = this.breakpoint && this.breakpoint.hitCondition;
|
|
314
|
+
let logMessage = this.breakpoint && this.breakpoint.logMessage;
|
|
315
|
+
this.rememberInput();
|
|
316
|
+
if (this.conditionInput || this.context === 0 ) {
|
|
317
|
+
condition = this.conditionInput;
|
|
318
|
+
}
|
|
319
|
+
if (this.hitCountInput || this.context === 1 ) {
|
|
320
|
+
hitCondition = this.hitCountInput;
|
|
321
|
+
}
|
|
322
|
+
if (this.logMessageInput || this.context === 2 ) {
|
|
323
|
+
logMessage = this.logMessageInput;
|
|
324
|
+
}
|
|
325
|
+
if (this.breakpoint) {
|
|
326
|
+
const data = ( (new Map()));
|
|
327
|
+
data.set(this.breakpoint.getId(), {
|
|
328
|
+
condition,
|
|
329
|
+
hitCondition,
|
|
330
|
+
logMessage
|
|
331
|
+
});
|
|
332
|
+
this.debugService.updateBreakpoints(this.breakpoint.originalUri, data, false).then(undefined, onUnexpectedError);
|
|
333
|
+
}
|
|
334
|
+
else {
|
|
335
|
+
const model = this.editor.getModel();
|
|
336
|
+
if (model) {
|
|
337
|
+
this.debugService.addBreakpoints(model.uri, [{
|
|
338
|
+
lineNumber: this.lineNumber,
|
|
339
|
+
column: this.column,
|
|
340
|
+
enabled: true,
|
|
341
|
+
condition,
|
|
342
|
+
hitCondition,
|
|
343
|
+
logMessage
|
|
344
|
+
}]);
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
this.dispose();
|
|
349
|
+
}
|
|
350
|
+
dispose() {
|
|
351
|
+
super.dispose();
|
|
352
|
+
this.input.dispose();
|
|
353
|
+
lifecycle.dispose(this.toDispose);
|
|
354
|
+
setTimeout(() => this.editor.focus(), 0);
|
|
355
|
+
}
|
|
356
|
+
};
|
|
357
|
+
BreakpointWidget = ( (__decorate([
|
|
358
|
+
( (__param(4, IContextViewService))),
|
|
359
|
+
( (__param(5, IDebugService))),
|
|
360
|
+
( (__param(6, IThemeService))),
|
|
361
|
+
( (__param(7, IContextKeyService))),
|
|
362
|
+
( (__param(8, IInstantiationService))),
|
|
363
|
+
( (__param(9, IModelService))),
|
|
364
|
+
( (__param(10, ICodeEditorService))),
|
|
365
|
+
( (__param(11, IConfigurationService))),
|
|
366
|
+
( (__param(12, ILanguageFeaturesService))),
|
|
367
|
+
( (__param(13, IKeybindingService)))
|
|
368
|
+
], BreakpointWidget)));
|
|
369
|
+
class AcceptBreakpointWidgetInputAction extends EditorCommand {
|
|
370
|
+
static { this.ID = 'breakpointWidget.action.acceptInput'; }
|
|
371
|
+
constructor() {
|
|
372
|
+
super({
|
|
373
|
+
id: AcceptBreakpointWidgetInputAction.ID,
|
|
374
|
+
precondition: CONTEXT_BREAKPOINT_WIDGET_VISIBLE,
|
|
375
|
+
kbOpts: {
|
|
376
|
+
kbExpr: CONTEXT_IN_BREAKPOINT_WIDGET,
|
|
377
|
+
primary: 3 ,
|
|
378
|
+
weight: 100
|
|
379
|
+
}
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
runEditorCommand(accessor, editor) {
|
|
383
|
+
accessor.get(IPrivateBreakpointWidgetService).close(true);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
class CloseBreakpointWidgetCommand extends EditorCommand {
|
|
387
|
+
static { this.ID = 'closeBreakpointWidget'; }
|
|
388
|
+
constructor() {
|
|
389
|
+
super({
|
|
390
|
+
id: CloseBreakpointWidgetCommand.ID,
|
|
391
|
+
precondition: CONTEXT_BREAKPOINT_WIDGET_VISIBLE,
|
|
392
|
+
kbOpts: {
|
|
393
|
+
kbExpr: EditorContextKeys.textInputFocus,
|
|
394
|
+
primary: 9 ,
|
|
395
|
+
secondary: [1024 | 9 ],
|
|
396
|
+
weight: 100
|
|
397
|
+
}
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
runEditorCommand(accessor, editor, args) {
|
|
401
|
+
const debugContribution = editor.getContribution(BREAKPOINT_EDITOR_CONTRIBUTION_ID);
|
|
402
|
+
if (debugContribution) {
|
|
403
|
+
return debugContribution.closeBreakpointWidget();
|
|
404
|
+
}
|
|
405
|
+
accessor.get(IPrivateBreakpointWidgetService).close(false);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
registerEditorCommand(( (new AcceptBreakpointWidgetInputAction())));
|
|
409
|
+
registerEditorCommand(( (new CloseBreakpointWidgetCommand())));
|
|
410
|
+
export { BreakpointWidget };
|