@codingame/monaco-vscode-api 1.85.6 → 2.0.0-v2.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 +30 -25
- package/api.js +19 -19
- package/assets.js +1 -1
- package/contributions.js +2 -2
- package/extensions.js +7 -7
- package/l10n.js +1 -1
- package/lifecycle.js +5 -5
- package/localExtensionHost.js +19 -19
- package/missing-services.js +26 -26
- package/monaco.js +33 -33
- package/package.json +10 -13
- package/service-override/tools/editor.d.ts +1 -0
- package/service-override/tools/editor.js +13 -13
- package/services.d.ts +11 -10
- package/services.js +94 -39
- package/tools/injection.js +1 -1
- package/tools/l10n.js +10 -10
- package/vscode/src/vs/base/browser/broadcast.js +4 -4
- package/vscode/src/vs/base/browser/browser.js +140 -0
- package/vscode/src/vs/base/browser/canIUse.js +24 -0
- package/vscode/src/vs/base/browser/defaultWorkerFactory.js +98 -0
- package/vscode/src/vs/base/browser/dnd.js +57 -0
- package/vscode/src/vs/base/browser/dom.js +1451 -0
- package/vscode/src/vs/base/browser/dompurify/dompurify.js +888 -0
- package/vscode/src/vs/base/browser/event.js +17 -0
- package/vscode/src/vs/base/browser/fastDomNode.js +274 -0
- package/vscode/src/vs/base/browser/formattedTextRenderer.js +161 -0
- package/vscode/src/vs/base/browser/globalPointerMoveMonitor.js +59 -0
- package/vscode/src/vs/base/browser/iframe.js +89 -0
- package/vscode/src/vs/base/browser/indexedDB.js +146 -0
- package/vscode/src/vs/base/browser/keyboardEvent.js +144 -0
- package/vscode/src/vs/base/browser/markdownRenderer.js +586 -0
- package/vscode/src/vs/base/browser/mouseEvent.js +106 -0
- package/vscode/src/vs/base/browser/performance.js +142 -0
- package/vscode/src/vs/base/browser/touch.js +236 -0
- package/vscode/src/vs/base/browser/trustedTypes.js +22 -0
- package/vscode/src/vs/base/browser/ui/actionbar/actionViewItems.js +360 -0
- package/vscode/src/vs/base/browser/ui/actionbar/actionbar.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/actionbar/actionbar.js +475 -0
- package/vscode/src/vs/base/browser/ui/aria/aria.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/aria/aria.js +69 -0
- package/vscode/src/vs/base/browser/ui/button/button.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/button/button.js +371 -0
- package/vscode/src/vs/base/browser/ui/codicons/codicon/codicon-modifiers.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/codicons/codicon/codicon.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/contextview/contextview.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/contextview/contextview.js +271 -0
- package/vscode/src/vs/base/browser/ui/countBadge/countBadge.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/countBadge/countBadge.js +36 -0
- package/vscode/src/vs/base/browser/ui/dialog/dialog.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/dialog/dialog.js +355 -0
- package/vscode/src/vs/base/browser/ui/dropdown/dropdown.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/dropdown/dropdown.js +148 -0
- package/vscode/src/vs/base/browser/ui/dropdown/dropdownActionViewItem.js +165 -0
- package/vscode/src/vs/base/browser/ui/findinput/findInput.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/findinput/findInput.js +304 -0
- package/vscode/src/vs/base/browser/ui/findinput/findInputToggles.js +55 -0
- package/vscode/src/vs/base/browser/ui/findinput/replaceInput.js +210 -0
- package/vscode/src/vs/base/browser/ui/highlightedlabel/highlightedLabel.js +96 -0
- package/vscode/src/vs/base/browser/ui/hover/hover.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/hover/hoverWidget.js +79 -0
- package/vscode/src/vs/base/browser/ui/iconLabel/iconLabel.js +253 -0
- package/vscode/src/vs/base/browser/ui/iconLabel/iconLabelHover.js +183 -0
- package/vscode/src/vs/base/browser/ui/iconLabel/iconLabels.js +30 -0
- package/vscode/src/vs/base/browser/ui/iconLabel/iconlabel.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/iconLabel/simpleIconLabel.js +2 -2
- package/vscode/src/vs/base/browser/ui/inputbox/inputBox.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/inputbox/inputBox.js +572 -0
- package/vscode/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.js +118 -0
- package/vscode/src/vs/base/browser/ui/list/list.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/list/list.js +19 -0
- package/vscode/src/vs/base/browser/ui/list/listPaging.js +221 -0
- package/vscode/src/vs/base/browser/ui/list/listView.js +1120 -0
- package/vscode/src/vs/base/browser/ui/list/listWidget.js +1488 -0
- package/vscode/src/vs/base/browser/ui/list/rangeMap.js +122 -0
- package/vscode/src/vs/base/browser/ui/list/rowCache.js +99 -0
- package/vscode/src/vs/base/browser/ui/list/splice.js +9 -0
- package/vscode/src/vs/base/browser/ui/menu/menu.js +1108 -0
- package/vscode/src/vs/base/browser/ui/menu/menubar.js +45 -45
- package/vscode/src/vs/base/browser/ui/mouseCursor/mouseCursor.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/mouseCursor/mouseCursor.js +3 -0
- package/vscode/src/vs/base/browser/ui/progressbar/progressbar.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/progressbar/progressbar.js +125 -0
- package/vscode/src/vs/base/browser/ui/resizable/resizable.js +160 -0
- package/vscode/src/vs/base/browser/ui/sash/sash.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/sash/sash.js +373 -0
- package/vscode/src/vs/base/browser/ui/scrollbar/abstractScrollbar.js +191 -0
- package/vscode/src/vs/base/browser/ui/scrollbar/horizontalScrollbar.js +92 -0
- package/vscode/src/vs/base/browser/ui/scrollbar/media/scrollbars.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/scrollbar/scrollableElement.js +487 -0
- package/vscode/src/vs/base/browser/ui/scrollbar/scrollbarArrow.js +69 -0
- package/vscode/src/vs/base/browser/ui/scrollbar/scrollbarState.js +142 -0
- package/vscode/src/vs/base/browser/ui/scrollbar/scrollbarVisibilityController.js +83 -0
- package/vscode/src/vs/base/browser/ui/scrollbar/verticalScrollbar.js +92 -0
- package/vscode/src/vs/base/browser/ui/selectBox/selectBox.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/selectBox/selectBox.js +42 -0
- package/vscode/src/vs/base/browser/ui/selectBox/selectBoxCustom.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/selectBox/selectBoxCustom.js +755 -0
- package/vscode/src/vs/base/browser/ui/selectBox/selectBoxNative.js +140 -0
- package/vscode/src/vs/base/browser/ui/splitview/paneview.js +11 -11
- package/vscode/src/vs/base/browser/ui/splitview/splitview.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/splitview/splitview.js +855 -0
- package/vscode/src/vs/base/browser/ui/table/table.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/table/tableWidget.js +253 -0
- package/vscode/src/vs/base/browser/ui/toggle/toggle.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/toggle/toggle.js +258 -0
- package/vscode/src/vs/base/browser/ui/toolbar/toolbar.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/toolbar/toolbar.js +157 -0
- package/vscode/src/vs/base/browser/ui/tree/abstractTree.js +1949 -0
- package/vscode/src/vs/base/browser/ui/tree/asyncDataTree.js +1021 -0
- package/vscode/src/vs/base/browser/ui/tree/compressedObjectTreeModel.js +390 -0
- package/vscode/src/vs/base/browser/ui/tree/dataTree.js +113 -0
- package/vscode/src/vs/base/browser/ui/tree/indexTreeModel.js +543 -0
- package/vscode/src/vs/base/browser/ui/tree/media/tree.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/tree/objectTree.js +128 -0
- package/vscode/src/vs/base/browser/ui/tree/objectTreeModel.js +222 -0
- package/vscode/src/vs/base/browser/ui/tree/tree.js +34 -0
- package/vscode/src/vs/base/browser/ui/tree/treeDefaults.js +3 -3
- package/vscode/src/vs/base/browser/ui/widget.js +41 -0
- package/vscode/src/vs/base/browser/window.js +18 -0
- package/vscode/src/vs/base/common/actions.js +166 -0
- package/vscode/src/vs/base/common/arrays.js +531 -0
- package/vscode/src/vs/base/common/arraysFind.js +126 -0
- package/vscode/src/vs/base/common/assert.js +29 -0
- package/vscode/src/vs/base/common/async.js +1059 -0
- package/vscode/src/vs/base/common/buffer.js +322 -0
- package/vscode/src/vs/base/common/cache.js +56 -0
- package/vscode/src/vs/base/common/cancellation.js +97 -0
- package/vscode/src/vs/base/common/codicons.js +583 -0
- package/vscode/src/vs/base/common/collections.js +52 -0
- package/vscode/src/vs/base/common/color.js +452 -0
- package/vscode/src/vs/base/common/comparers.js +230 -0
- package/vscode/src/vs/base/common/dataTransfer.js +103 -0
- package/vscode/src/vs/base/common/date.js +1 -1
- package/vscode/src/vs/base/common/decorators.js +106 -0
- package/vscode/src/vs/base/common/diff/diff.js +678 -0
- package/vscode/src/vs/base/common/diff/diffChange.js +15 -0
- package/vscode/src/vs/base/common/errorMessage.js +101 -0
- package/vscode/src/vs/base/common/errors.js +165 -0
- package/vscode/src/vs/base/common/event.js +930 -0
- package/vscode/src/vs/base/common/extpath.js +247 -0
- package/vscode/src/vs/base/common/filters.js +643 -0
- package/vscode/src/vs/base/common/functional.js +24 -0
- package/vscode/src/vs/base/common/fuzzyScorer.js +483 -0
- package/vscode/src/vs/base/common/glob.js +512 -0
- package/vscode/src/vs/base/common/hash.js +252 -0
- package/vscode/src/vs/base/common/history.js +200 -0
- package/vscode/src/vs/base/common/hotReload.js +64 -0
- package/vscode/src/vs/base/common/htmlContent.js +135 -0
- package/vscode/src/vs/base/common/iconLabels.js +70 -0
- package/vscode/src/vs/base/common/idGenerator.js +11 -0
- package/vscode/src/vs/base/common/ime.js +21 -0
- package/vscode/src/vs/base/common/iterator.js +122 -0
- package/vscode/src/vs/base/common/json.js +829 -0
- package/vscode/src/vs/base/common/jsonEdit.js +1 -1
- package/vscode/src/vs/base/common/jsonErrorMessages.js +1 -1
- package/vscode/src/vs/base/common/jsonFormatter.js +1 -1
- package/vscode/src/vs/base/common/keyCodes.js +354 -0
- package/vscode/src/vs/base/common/keybindingLabels.js +197 -0
- package/vscode/src/vs/base/common/keybindings.js +146 -0
- package/vscode/src/vs/base/common/labels.js +260 -0
- package/vscode/src/vs/base/common/lazy.js +26 -0
- package/vscode/src/vs/base/common/lifecycle.js +420 -0
- package/vscode/src/vs/base/common/linkedList.js +114 -0
- package/vscode/src/vs/base/common/linkedText.js +37 -0
- package/vscode/src/vs/base/common/map.js +606 -0
- package/vscode/src/vs/base/common/marshalling.js +50 -0
- package/vscode/src/vs/base/common/mime.js +104 -0
- package/vscode/src/vs/base/common/naturalLanguage/korean.js +203 -0
- package/vscode/src/vs/base/common/navigator.js +31 -0
- package/vscode/src/vs/base/common/network.js +237 -0
- package/vscode/src/vs/base/common/numbers.js +55 -0
- package/vscode/src/vs/base/common/objects.js +209 -0
- package/vscode/src/vs/base/common/observableInternal/autorun.js +158 -0
- package/vscode/src/vs/base/common/observableInternal/base.js +289 -0
- package/vscode/src/vs/base/common/observableInternal/derived.js +250 -0
- package/vscode/src/vs/base/common/observableInternal/utils.js +292 -0
- package/vscode/src/vs/base/common/path.js +1135 -0
- package/vscode/src/vs/base/common/performance.js +18 -0
- package/vscode/src/vs/base/common/platform.js +183 -0
- package/vscode/src/vs/base/common/prefixTree.js +1 -1
- package/vscode/src/vs/base/common/process.js +33 -0
- package/vscode/src/vs/base/common/range.js +37 -0
- package/vscode/src/vs/base/common/resourceTree.js +6 -6
- package/vscode/src/vs/base/common/resources.js +240 -0
- package/vscode/src/vs/base/common/scrollable.js +315 -0
- package/vscode/src/vs/base/common/search.js +45 -0
- package/vscode/src/vs/base/common/severity.js +41 -0
- package/vscode/src/vs/base/common/stopwatch.js +25 -0
- package/vscode/src/vs/base/common/stream.js +368 -0
- package/vscode/src/vs/base/common/strings.js +739 -0
- package/vscode/src/vs/base/common/symbols.js +2 -0
- package/vscode/src/vs/base/common/ternarySearchTree.js +613 -0
- package/vscode/src/vs/base/common/themables.js +84 -0
- package/vscode/src/vs/base/common/types.js +106 -0
- package/vscode/src/vs/base/common/uint.js +19 -0
- package/vscode/src/vs/base/common/uri.js +454 -0
- package/vscode/src/vs/base/common/uriIpc.js +2 -2
- package/vscode/src/vs/base/common/uuid.js +55 -0
- package/vscode/src/vs/base/common/verifier.js +1 -1
- package/vscode/src/vs/base/common/worker/simpleWorker.js +404 -0
- package/vscode/src/vs/base/parts/ipc/common/ipc.js +7 -7
- package/vscode/src/vs/base/parts/ipc/common/ipc.net.js +3 -3
- package/vscode/src/vs/base/parts/storage/common/storage.js +224 -0
- package/vscode/src/vs/editor/browser/config/charWidthReader.js +93 -0
- package/vscode/src/vs/editor/browser/config/domFontInfo.js +22 -0
- package/vscode/src/vs/editor/browser/config/editorConfiguration.js +174 -4
- package/vscode/src/vs/editor/browser/config/elementSizeObserver.js +92 -0
- package/vscode/src/vs/editor/browser/config/fontMeasurements.js +186 -0
- package/vscode/src/vs/editor/browser/config/migrateOptions.js +185 -0
- package/vscode/src/vs/editor/browser/config/tabFocus.js +17 -0
- package/vscode/src/vs/editor/browser/controller/mouseHandler.js +601 -0
- package/vscode/src/vs/editor/browser/controller/mouseTarget.js +819 -0
- package/vscode/src/vs/editor/browser/controller/pointerHandler.js +114 -0
- package/vscode/src/vs/editor/browser/controller/textAreaHandler.css.js +4 -0
- package/vscode/src/vs/editor/browser/controller/textAreaHandler.js +716 -0
- package/vscode/src/vs/editor/browser/controller/textAreaInput.js +516 -0
- package/vscode/src/vs/editor/browser/controller/textAreaState.js +187 -0
- package/vscode/src/vs/editor/browser/coreCommands.js +1713 -0
- package/vscode/src/vs/editor/browser/dnd.js +70 -0
- package/vscode/src/vs/editor/browser/editorBrowser.d.ts +2 -2
- package/vscode/src/vs/editor/browser/editorBrowser.js +41 -0
- package/vscode/src/vs/editor/browser/editorDom.js +246 -0
- package/vscode/src/vs/editor/browser/editorExtensions.js +445 -0
- package/vscode/src/vs/editor/browser/services/abstractCodeEditorService.js +665 -0
- package/vscode/src/vs/editor/browser/services/bulkEditService.js +70 -0
- package/vscode/src/vs/editor/browser/services/codeEditorService.js +3 -0
- package/vscode/src/vs/editor/browser/services/editorWorkerService.js +467 -0
- package/vscode/src/vs/editor/browser/services/markerDecorations.js +15 -0
- package/vscode/src/vs/editor/browser/services/openerService.js +201 -0
- package/vscode/src/vs/editor/browser/services/webWorker.js +57 -0
- package/vscode/src/vs/editor/browser/stableEditorScroll.js +50 -0
- package/vscode/src/vs/editor/browser/view/domLineBreaksComputer.js +287 -0
- package/vscode/src/vs/editor/browser/view/dynamicViewOverlay.js +4 -0
- package/vscode/src/vs/editor/browser/view/renderingContext.js +119 -0
- package/vscode/src/vs/editor/browser/view/viewController.js +261 -0
- package/vscode/src/vs/editor/browser/view/viewLayer.js +419 -0
- package/vscode/src/vs/editor/browser/view/viewOverlays.js +199 -0
- package/vscode/src/vs/editor/browser/view/viewPart.js +43 -0
- package/vscode/src/vs/editor/browser/view/viewUserInputEvents.js +85 -0
- package/vscode/src/vs/editor/browser/view.js +580 -0
- package/vscode/src/vs/editor/browser/viewParts/blockDecorations/blockDecorations.css.js +4 -0
- package/vscode/src/vs/editor/browser/viewParts/blockDecorations/blockDecorations.js +87 -0
- package/vscode/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +424 -0
- package/vscode/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.css.js +4 -0
- package/vscode/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js +171 -0
- package/vscode/src/vs/editor/browser/viewParts/decorations/decorations.css.js +4 -0
- package/vscode/src/vs/editor/browser/viewParts/decorations/decorations.js +192 -0
- package/vscode/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.js +136 -0
- package/vscode/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.css.js +4 -0
- package/vscode/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +346 -0
- package/vscode/src/vs/editor/browser/viewParts/indentGuides/indentGuides.css.js +4 -0
- package/vscode/src/vs/editor/browser/viewParts/indentGuides/indentGuides.js +250 -0
- package/vscode/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.css.js +4 -0
- package/vscode/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.js +151 -0
- package/vscode/src/vs/editor/browser/viewParts/lines/domReadingContext.js +38 -0
- package/vscode/src/vs/editor/browser/viewParts/lines/rangeUtil.js +102 -0
- package/vscode/src/vs/editor/browser/viewParts/lines/viewLine.js +528 -0
- package/vscode/src/vs/editor/browser/viewParts/lines/viewLines.css.js +4 -0
- package/vscode/src/vs/editor/browser/viewParts/lines/viewLines.js +645 -0
- package/vscode/src/vs/editor/browser/viewParts/linesDecorations/linesDecorations.css.js +4 -0
- package/vscode/src/vs/editor/browser/viewParts/linesDecorations/linesDecorations.js +101 -0
- package/vscode/src/vs/editor/browser/viewParts/margin/margin.css.js +4 -0
- package/vscode/src/vs/editor/browser/viewParts/margin/margin.js +57 -0
- package/vscode/src/vs/editor/browser/viewParts/marginDecorations/marginDecorations.css.js +4 -0
- package/vscode/src/vs/editor/browser/viewParts/marginDecorations/marginDecorations.js +76 -0
- package/vscode/src/vs/editor/browser/viewParts/minimap/minimap.css.js +4 -0
- package/vscode/src/vs/editor/browser/viewParts/minimap/minimap.js +1439 -0
- package/vscode/src/vs/editor/browser/viewParts/minimap/minimapCharRenderer.js +84 -0
- package/vscode/src/vs/editor/browser/viewParts/minimap/minimapCharRendererFactory.js +98 -0
- package/vscode/src/vs/editor/browser/viewParts/minimap/minimapCharSheet.js +19 -0
- package/vscode/src/vs/editor/browser/viewParts/minimap/minimapPreBaked.js +31 -0
- package/vscode/src/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.css.js +4 -0
- package/vscode/src/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js +115 -0
- package/vscode/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.js +377 -0
- package/vscode/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js +124 -0
- package/vscode/src/vs/editor/browser/viewParts/rulers/rulers.css.js +4 -0
- package/vscode/src/vs/editor/browser/viewParts/rulers/rulers.js +68 -0
- package/vscode/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.css.js +4 -0
- package/vscode/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js +61 -0
- package/vscode/src/vs/editor/browser/viewParts/selections/selections.css.js +4 -0
- package/vscode/src/vs/editor/browser/viewParts/selections/selections.js +306 -0
- package/vscode/src/vs/editor/browser/viewParts/viewCursors/viewCursor.js +188 -0
- package/vscode/src/vs/editor/browser/viewParts/viewCursors/viewCursors.css.js +4 -0
- package/vscode/src/vs/editor/browser/viewParts/viewCursors/viewCursors.js +307 -0
- package/vscode/src/vs/editor/browser/viewParts/viewZones/viewZones.js +319 -0
- package/vscode/src/vs/editor/browser/viewParts/whitespace/whitespace.css.js +4 -0
- package/vscode/src/vs/editor/browser/viewParts/whitespace/whitespace.js +256 -0
- package/vscode/src/vs/editor/browser/widget/codeEditorContributions.js +109 -0
- package/vscode/src/vs/editor/browser/widget/codeEditorWidget.js +1813 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/accessibleDiffViewer.css.js +4 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/accessibleDiffViewer.js +608 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/colors.js +17 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/decorations.js +70 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/delegatingEditorImpl.js +106 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditor.contribution.js +329 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorDecorations.js +231 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorEditors.js +152 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorOptions.js +88 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorSash.js +65 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorViewModel.js +352 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +488 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffProviderFactoryService.js +18 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/hideUnchangedRegionsFeature.js +374 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/inlineDiffDeletedCodeMargin.js +162 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/lineAlignment.js +479 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/movedBlocksLines.js +298 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/outlineModel.js +299 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/overviewRulerPart.js +141 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/renderLines.js +124 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/style.css.js +4 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/utils.js +343 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/workerBasedDocumentDiffProvider.js +101 -0
- package/vscode/src/vs/editor/browser/widget/embeddedCodeEditorWidget.js +74 -0
- package/vscode/src/vs/editor/browser/widget/media/editor.css.js +4 -0
- package/vscode/src/vs/editor/common/commands/replaceCommand.js +79 -0
- package/vscode/src/vs/editor/common/commands/shiftCommand.js +228 -0
- package/vscode/src/vs/editor/common/commands/surroundSelectionCommand.js +60 -0
- package/vscode/src/vs/editor/common/commands/trimTrailingWhitespaceCommand.js +68 -0
- package/vscode/src/vs/editor/common/config/diffEditor.js +31 -0
- package/vscode/src/vs/editor/common/config/editorConfigurationSchema.js +472 -0
- package/vscode/src/vs/editor/common/config/editorOptions.js +4765 -0
- package/vscode/src/vs/editor/common/config/editorZoom.js +20 -0
- package/vscode/src/vs/editor/common/config/fontInfo.js +127 -0
- package/vscode/src/vs/editor/common/core/characterClassifier.js +50 -0
- package/vscode/src/vs/editor/common/core/cursorColumns.js +80 -0
- package/vscode/src/vs/editor/common/core/editOperation.js +30 -0
- package/vscode/src/vs/editor/common/core/editorColorRegistry.js +346 -0
- package/vscode/src/vs/editor/common/core/eolCounter.js +36 -0
- package/vscode/src/vs/editor/common/core/indentation.js +33 -0
- package/vscode/src/vs/editor/common/core/lineRange.js +270 -0
- package/vscode/src/vs/editor/common/core/offsetRange.js +175 -0
- package/vscode/src/vs/editor/common/core/position.js +84 -0
- package/vscode/src/vs/editor/common/core/range.js +302 -0
- package/vscode/src/vs/editor/common/core/rgba.js +26 -0
- package/vscode/src/vs/editor/common/core/selection.js +107 -0
- package/vscode/src/vs/editor/common/core/stringBuilder.js +104 -0
- package/vscode/src/vs/editor/common/core/textChange.js +260 -0
- package/vscode/src/vs/editor/common/core/textModelDefaults.js +13 -0
- package/vscode/src/vs/editor/common/core/wordCharacterClassifier.js +22 -0
- package/vscode/src/vs/editor/common/core/wordHelper.js +105 -0
- package/vscode/src/vs/editor/common/cursor/cursor.js +862 -0
- package/vscode/src/vs/editor/common/cursor/cursorAtomicMoveOperations.js +104 -0
- package/vscode/src/vs/editor/common/cursor/cursorCollection.js +191 -0
- package/vscode/src/vs/editor/common/cursor/cursorColumnSelection.js +84 -0
- package/vscode/src/vs/editor/common/cursor/cursorContext.js +10 -0
- package/vscode/src/vs/editor/common/cursor/cursorDeleteOperations.js +211 -0
- package/vscode/src/vs/editor/common/cursor/cursorMoveCommands.js +648 -0
- package/vscode/src/vs/editor/common/cursor/cursorMoveOperations.js +276 -0
- package/vscode/src/vs/editor/common/cursor/cursorTypeOperations.js +923 -0
- package/vscode/src/vs/editor/common/cursor/cursorWordOperations.js +670 -0
- package/vscode/src/vs/editor/common/cursor/oneCursor.js +142 -0
- package/vscode/src/vs/editor/common/cursorCommon.js +230 -0
- package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/algorithms/diffAlgorithm.js +120 -0
- package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/algorithms/dynamicProgrammingDiffing.js +84 -0
- package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/algorithms/myersDiffAlgorithm.js +134 -0
- package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/computeMovedLines.js +259 -0
- package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer.js +215 -0
- package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/heuristicSequenceOptimizations.js +329 -0
- package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/lineSequence.js +31 -0
- package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/linesSliceCharSequence.js +166 -0
- package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/utils.js +57 -0
- package/vscode/src/vs/editor/common/diff/documentDiffProvider.d.ts +1 -0
- package/vscode/src/vs/editor/common/diff/legacyLinesDiffComputer.js +497 -0
- package/vscode/src/vs/editor/common/diff/linesDiffComputer.js +19 -0
- package/vscode/src/vs/editor/common/diff/linesDiffComputers.js +7 -0
- package/vscode/src/vs/editor/common/diff/rangeMapping.js +59 -0
- package/vscode/src/vs/editor/common/editorAction.js +21 -0
- package/vscode/src/vs/editor/common/editorCommon.d.ts +2 -2
- package/vscode/src/vs/editor/common/editorCommon.js +8 -0
- package/vscode/src/vs/editor/common/editorContextKeys.js +229 -0
- package/vscode/src/vs/editor/common/editorFeatures.js +8 -0
- package/vscode/src/vs/editor/common/editorTheme.js +18 -0
- package/vscode/src/vs/editor/common/encodedTokenAttributes.js +72 -0
- package/vscode/src/vs/editor/common/languageFeatureRegistry.js +159 -0
- package/vscode/src/vs/editor/common/languageSelector.js +94 -0
- package/vscode/src/vs/editor/common/languages/autoIndent.js +333 -0
- package/vscode/src/vs/editor/common/languages/defaultDocumentColorsComputer.js +131 -0
- package/vscode/src/vs/editor/common/languages/enterAction.js +56 -0
- package/vscode/src/vs/editor/common/languages/language.js +3 -0
- package/vscode/src/vs/editor/common/languages/languageConfiguration.js +105 -0
- package/vscode/src/vs/editor/common/languages/languageConfigurationRegistry.d.ts +1 -0
- package/vscode/src/vs/editor/common/languages/languageConfigurationRegistry.js +337 -0
- package/vscode/src/vs/editor/common/languages/linkComputer.js +245 -0
- package/vscode/src/vs/editor/common/languages/modesRegistry.js +56 -0
- package/vscode/src/vs/editor/common/languages/nullTokenize.js +23 -0
- package/vscode/src/vs/editor/common/languages/supports/characterPair.js +34 -0
- package/vscode/src/vs/editor/common/languages/supports/electricCharacter.js +48 -0
- package/vscode/src/vs/editor/common/languages/supports/indentRules.js +54 -0
- package/vscode/src/vs/editor/common/languages/supports/inplaceReplaceSupport.js +80 -0
- package/vscode/src/vs/editor/common/languages/supports/languageBracketsConfiguration.js +100 -0
- package/vscode/src/vs/editor/common/languages/supports/onEnter.js +100 -0
- package/vscode/src/vs/editor/common/languages/supports/richEditBrackets.js +271 -0
- package/vscode/src/vs/editor/common/languages/supports/tokenization.js +294 -0
- package/vscode/src/vs/editor/common/languages/supports.js +53 -0
- package/vscode/src/vs/editor/common/languages/textToHtmlTokenizer.js +124 -0
- package/vscode/src/vs/editor/common/languages.js +308 -0
- package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsImpl.js +667 -0
- package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/ast.js +499 -0
- package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/beforeEditPositionMapper.js +93 -0
- package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/bracketPairsTree.js +341 -0
- package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/brackets.js +112 -0
- package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/combineTextEditInfos.js +113 -0
- package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/concat23Trees.js +148 -0
- package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js +140 -0
- package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/nodeReader.js +96 -0
- package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/parser.js +109 -0
- package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet.js +128 -0
- package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/tokenizer.js +300 -0
- package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/colorizedBracketPairsDecorationProvider.js +86 -0
- package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/fixBrackets.js +67 -0
- package/vscode/src/vs/editor/common/model/editStack.js +385 -0
- package/vscode/src/vs/editor/common/model/fixedArray.js +60 -0
- package/vscode/src/vs/editor/common/model/guidesTextModelPart.js +364 -0
- package/vscode/src/vs/editor/common/model/indentationGuesser.js +139 -0
- package/vscode/src/vs/editor/common/model/intervalTree.js +875 -0
- package/vscode/src/vs/editor/common/model/mirrorTextModel.js +95 -0
- package/vscode/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.js +1483 -0
- package/vscode/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.js +491 -0
- package/vscode/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder.js +147 -0
- package/vscode/src/vs/editor/common/model/pieceTreeTextBuffer/rbTreeBase.js +345 -0
- package/vscode/src/vs/editor/common/model/prefixSumComputer.js +200 -0
- package/vscode/src/vs/editor/common/model/textModel.js +1904 -0
- package/vscode/src/vs/editor/common/model/textModelPart.js +17 -0
- package/vscode/src/vs/editor/common/model/textModelSearch.js +434 -0
- package/vscode/src/vs/editor/common/model/textModelTokens.js +408 -0
- package/vscode/src/vs/editor/common/model/tokenizationTextModelPart.js +489 -0
- package/vscode/src/vs/editor/common/model/utils.js +23 -0
- package/vscode/src/vs/editor/common/model.d.ts +2 -2
- package/vscode/src/vs/editor/common/model.js +101 -0
- package/vscode/src/vs/editor/common/modelLineProjectionData.js +248 -0
- package/vscode/src/vs/editor/common/services/editorBaseApi.js +37 -0
- package/vscode/src/vs/editor/common/services/editorSimpleWorker.js +591 -0
- package/vscode/src/vs/editor/common/services/editorWorker.js +3 -0
- package/vscode/src/vs/editor/common/services/getIconClasses.js +81 -0
- package/vscode/src/vs/editor/common/services/languageFeatureDebounce.js +128 -0
- package/vscode/src/vs/editor/common/services/languageFeatures.js +3 -0
- package/vscode/src/vs/editor/common/services/languageFeaturesService.js +46 -0
- package/vscode/src/vs/editor/common/services/languageService.js +148 -0
- package/vscode/src/vs/editor/common/services/languagesAssociations.js +170 -0
- package/vscode/src/vs/editor/common/services/languagesRegistry.js +285 -0
- package/vscode/src/vs/editor/common/services/markerDecorations.js +3 -0
- package/vscode/src/vs/editor/common/services/markerDecorationsService.js +222 -0
- package/vscode/src/vs/editor/common/services/model.js +3 -0
- package/vscode/src/vs/editor/common/services/modelService.js +496 -0
- package/vscode/src/vs/editor/common/services/resolverService.js +7 -0
- package/vscode/src/vs/editor/common/services/semanticTokensDto.js +122 -0
- package/vscode/src/vs/editor/common/services/semanticTokensProviderStyling.js +255 -0
- package/vscode/src/vs/editor/common/services/semanticTokensStyling.js +3 -0
- package/vscode/src/vs/editor/common/services/semanticTokensStylingService.js +38 -0
- package/vscode/src/vs/editor/common/services/textResourceConfiguration.js +4 -0
- package/vscode/src/vs/editor/common/services/treeViewsDnd.js +22 -0
- package/vscode/src/vs/editor/common/services/treeViewsDndService.js +6 -0
- package/vscode/src/vs/editor/common/services/unicodeTextModelHighlighter.d.ts +2 -0
- package/vscode/src/vs/editor/common/services/unicodeTextModelHighlighter.js +178 -0
- package/vscode/src/vs/editor/common/standalone/standaloneEnums.js +584 -0
- package/vscode/src/vs/editor/common/standaloneStrings.js +151 -0
- package/vscode/src/vs/editor/common/textModelBracketPairs.js +35 -0
- package/vscode/src/vs/editor/common/textModelEvents.d.ts +1 -0
- package/vscode/src/vs/editor/common/textModelEvents.js +159 -0
- package/vscode/src/vs/editor/common/textModelGuides.js +28 -0
- package/vscode/src/vs/editor/common/tokenizationRegistry.js +115 -0
- package/vscode/src/vs/editor/common/tokens/contiguousMultilineTokens.js +152 -0
- package/vscode/src/vs/editor/common/tokens/contiguousMultilineTokensBuilder.js +53 -0
- package/vscode/src/vs/editor/common/tokens/contiguousTokensEditing.js +117 -0
- package/vscode/src/vs/editor/common/tokens/contiguousTokensStore.js +188 -0
- package/vscode/src/vs/editor/common/tokens/lineTokens.js +218 -0
- package/vscode/src/vs/editor/common/tokens/sparseMultilineTokens.js +403 -0
- package/vscode/src/vs/editor/common/tokens/sparseTokensStore.js +168 -0
- package/vscode/src/vs/editor/common/viewEventHandler.js +178 -0
- package/vscode/src/vs/editor/common/viewEvents.js +141 -0
- package/vscode/src/vs/editor/common/viewLayout/lineDecorations.js +206 -0
- package/vscode/src/vs/editor/common/viewLayout/linePart.js +17 -0
- package/vscode/src/vs/editor/common/viewLayout/linesLayout.js +612 -0
- package/vscode/src/vs/editor/common/viewLayout/viewLayout.js +375 -0
- package/vscode/src/vs/editor/common/viewLayout/viewLineRenderer.js +885 -0
- package/vscode/src/vs/editor/common/viewLayout/viewLinesViewportData.js +25 -0
- package/vscode/src/vs/editor/common/viewModel/minimapTokensColorTracker.js +50 -0
- package/vscode/src/vs/editor/common/viewModel/modelLineProjection.js +329 -0
- package/vscode/src/vs/editor/common/viewModel/monospaceLineBreaksComputer.js +404 -0
- package/vscode/src/vs/editor/common/viewModel/overviewZoneManager.js +168 -0
- package/vscode/src/vs/editor/common/viewModel/viewContext.js +16 -0
- package/vscode/src/vs/editor/common/viewModel/viewModelDecorations.js +177 -0
- package/vscode/src/vs/editor/common/viewModel/viewModelImpl.js +1118 -0
- package/vscode/src/vs/editor/common/viewModel/viewModelLines.js +935 -0
- package/vscode/src/vs/editor/common/viewModel.js +110 -0
- package/vscode/src/vs/editor/common/viewModelEventDispatcher.js +370 -0
- package/vscode/src/vs/editor/contrib/anchorSelect/browser/anchorSelect.css.js +4 -0
- package/vscode/src/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +176 -0
- package/vscode/src/vs/editor/contrib/bracketMatching/browser/bracketMatching.css.js +4 -0
- package/vscode/src/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +367 -0
- package/vscode/src/vs/editor/contrib/caretOperations/browser/caretOperations.js +53 -0
- package/vscode/src/vs/editor/contrib/caretOperations/browser/moveCaretCommand.js +53 -0
- package/vscode/src/vs/editor/contrib/caretOperations/browser/transpose.js +62 -0
- package/vscode/src/vs/editor/contrib/clipboard/browser/clipboard.js +268 -0
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeAction.js +279 -0
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionCommands.js +359 -0
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionContributions.js +47 -0
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionController.js +318 -0
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionKeybindingResolver.js +71 -0
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionMenu.js +92 -0
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionModel.js +261 -0
- package/vscode/src/vs/editor/contrib/codeAction/browser/lightBulbWidget.css.js +4 -0
- package/vscode/src/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +272 -0
- package/vscode/src/vs/editor/contrib/codeAction/common/types.js +152 -0
- package/vscode/src/vs/editor/contrib/codelens/browser/codeLensCache.js +92 -0
- package/vscode/src/vs/editor/contrib/codelens/browser/codelens.js +98 -0
- package/vscode/src/vs/editor/contrib/codelens/browser/codelensController.js +454 -0
- package/vscode/src/vs/editor/contrib/codelens/browser/codelensWidget.css.js +4 -0
- package/vscode/src/vs/editor/contrib/codelens/browser/codelensWidget.js +250 -0
- package/vscode/src/vs/editor/contrib/colorPicker/browser/color.js +109 -0
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorContributions.js +54 -0
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorDetector.js +245 -0
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorHoverParticipant.js +254 -0
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPicker.css.js +4 -0
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerModel.js +67 -0
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerWidget.js +357 -0
- package/vscode/src/vs/editor/contrib/colorPicker/browser/defaultDocumentColorProvider.js +48 -0
- package/vscode/src/vs/editor/contrib/colorPicker/browser/standaloneColorPickerActions.js +81 -0
- package/vscode/src/vs/editor/contrib/colorPicker/browser/standaloneColorPickerWidget.js +253 -0
- package/vscode/src/vs/editor/contrib/comment/browser/blockCommentCommand.js +159 -0
- package/vscode/src/vs/editor/contrib/comment/browser/comment.js +170 -0
- package/vscode/src/vs/editor/contrib/comment/browser/lineCommentCommand.js +309 -0
- package/vscode/src/vs/editor/contrib/contextmenu/browser/contextmenu.js +360 -0
- package/vscode/src/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +136 -0
- package/vscode/src/vs/editor/contrib/dnd/browser/dnd.css.js +4 -0
- package/vscode/src/vs/editor/contrib/dnd/browser/dnd.js +206 -0
- package/vscode/src/vs/editor/contrib/dnd/browser/dragAndDropCommand.js +84 -0
- package/vscode/src/vs/editor/contrib/documentSymbols/browser/documentSymbols.js +19 -0
- package/vscode/src/vs/editor/contrib/documentSymbols/browser/outlineModel.js +372 -0
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +59 -0
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +403 -0
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +195 -0
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution.js +43 -0
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +158 -0
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/edit.js +64 -0
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.css.js +4 -0
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +174 -0
- package/vscode/src/vs/editor/contrib/editorState/browser/editorState.js +101 -0
- package/vscode/src/vs/editor/contrib/editorState/browser/keybindingCancellation.js +77 -0
- package/vscode/src/vs/editor/contrib/find/browser/findController.js +1046 -0
- package/vscode/src/vs/editor/contrib/find/browser/findDecorations.js +292 -0
- package/vscode/src/vs/editor/contrib/find/browser/findModel.js +476 -0
- package/vscode/src/vs/editor/contrib/find/browser/findOptionsWidget.css.js +4 -0
- package/vscode/src/vs/editor/contrib/find/browser/findOptionsWidget.js +134 -0
- package/vscode/src/vs/editor/contrib/find/browser/findState.js +239 -0
- package/vscode/src/vs/editor/contrib/find/browser/findWidget.css.js +4 -0
- package/vscode/src/vs/editor/contrib/find/browser/findWidget.js +1238 -0
- package/vscode/src/vs/editor/contrib/find/browser/replaceAllCommand.js +44 -0
- package/vscode/src/vs/editor/contrib/find/browser/replacePattern.js +239 -0
- package/vscode/src/vs/editor/contrib/folding/browser/folding.css.js +4 -0
- package/vscode/src/vs/editor/contrib/folding/browser/folding.js +1149 -0
- package/vscode/src/vs/editor/contrib/folding/browser/foldingDecorations.js +154 -0
- package/vscode/src/vs/editor/contrib/folding/browser/foldingModel.js +454 -0
- package/vscode/src/vs/editor/contrib/folding/browser/foldingRanges.js +332 -0
- package/vscode/src/vs/editor/contrib/folding/browser/hiddenRangeModel.js +118 -0
- package/vscode/src/vs/editor/contrib/folding/browser/indentRangeProvider.js +148 -0
- package/vscode/src/vs/editor/contrib/folding/browser/syntaxRangeProvider.js +168 -0
- package/vscode/src/vs/editor/contrib/fontZoom/browser/fontZoom.js +57 -0
- package/vscode/src/vs/editor/contrib/format/browser/format.js +374 -0
- package/vscode/src/vs/editor/contrib/format/browser/formatActions.js +254 -0
- package/vscode/src/vs/editor/contrib/format/browser/formattingEdit.js +50 -0
- package/vscode/src/vs/editor/contrib/gotoError/browser/gotoError.js +285 -0
- package/vscode/src/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +383 -0
- package/vscode/src/vs/editor/contrib/gotoError/browser/markerNavigationService.js +187 -0
- package/vscode/src/vs/editor/contrib/gotoError/browser/media/gotoErrorWidget.css.js +4 -0
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +896 -0
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/goToSymbol.js +83 -0
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture.js +135 -0
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.css.js +4 -0
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +246 -0
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +355 -0
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +187 -0
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.css.js +4 -0
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +462 -0
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +290 -0
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +177 -0
- package/vscode/src/vs/editor/contrib/hover/browser/contentHover.js +829 -0
- package/vscode/src/vs/editor/contrib/hover/browser/getHover.js +44 -0
- package/vscode/src/vs/editor/contrib/hover/browser/hover.css.js +4 -0
- package/vscode/src/vs/editor/contrib/hover/browser/hover.js +645 -0
- package/vscode/src/vs/editor/contrib/hover/browser/hoverOperation.js +133 -0
- package/vscode/src/vs/editor/contrib/hover/browser/hoverTypes.js +44 -0
- package/vscode/src/vs/editor/contrib/hover/browser/marginHover.js +151 -0
- package/vscode/src/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +151 -0
- package/vscode/src/vs/editor/contrib/hover/browser/markerHoverParticipant.js +240 -0
- package/vscode/src/vs/editor/contrib/hover/browser/resizableContentWidget.js +86 -0
- package/vscode/src/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.css.js +4 -0
- package/vscode/src/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +147 -0
- package/vscode/src/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplaceCommand.js +30 -0
- package/vscode/src/vs/editor/contrib/indentation/browser/indentUtils.js +28 -0
- package/vscode/src/vs/editor/contrib/indentation/browser/indentation.js +639 -0
- package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHints.js +137 -0
- package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsContribution.js +6 -0
- package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +541 -0
- package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +171 -0
- package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsLocations.js +96 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/commandIds.js +4 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/commands.js +242 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/ghostText.css.js +4 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/ghostText.js +110 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/ghostTextWidget.js +268 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hoverParticipant.js +150 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys.js +71 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js +16 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController.js +228 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget.css.js +4 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget.js +323 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsModel.js +384 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsSource.js +290 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/provideInlineCompletions.js +253 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/singleTextEdit.js +172 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/suggestWidgetInlineCompletionProvider.js +182 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/utils.js +90 -0
- package/vscode/src/vs/editor/contrib/inlineProgress/browser/inlineProgress.js +120 -0
- package/vscode/src/vs/editor/contrib/inlineProgress/browser/inlineProgressWidget.css.js +4 -0
- package/vscode/src/vs/editor/contrib/lineSelection/browser/lineSelection.js +35 -0
- package/vscode/src/vs/editor/contrib/linesOperations/browser/copyLinesCommand.js +76 -0
- package/vscode/src/vs/editor/contrib/linesOperations/browser/linesOperations.js +1222 -0
- package/vscode/src/vs/editor/contrib/linesOperations/browser/moveLinesCommand.js +323 -0
- package/vscode/src/vs/editor/contrib/linesOperations/browser/sortLinesCommand.js +79 -0
- package/vscode/src/vs/editor/contrib/linkedEditing/browser/linkedEditing.css.js +4 -0
- package/vscode/src/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +369 -0
- package/vscode/src/vs/editor/contrib/links/browser/getLinks.js +137 -0
- package/vscode/src/vs/editor/contrib/links/browser/links.css.js +4 -0
- package/vscode/src/vs/editor/contrib/links/browser/links.js +394 -0
- package/vscode/src/vs/editor/contrib/longLinesHelper/browser/longLinesHelper.js +21 -0
- package/vscode/src/vs/editor/contrib/markdownRenderer/browser/markdownRenderer.js +106 -0
- package/vscode/src/vs/editor/contrib/markdownRenderer/browser/renderedMarkdown.css.js +4 -0
- package/vscode/src/vs/editor/contrib/message/browser/messageController.css.js +4 -0
- package/vscode/src/vs/editor/contrib/message/browser/messageController.js +173 -0
- package/vscode/src/vs/editor/contrib/multicursor/browser/multicursor.js +1123 -0
- package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHints.css.js +4 -0
- package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHints.js +119 -0
- package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHintsModel.js +251 -0
- package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +308 -0
- package/vscode/src/vs/editor/contrib/parameterHints/browser/provideSignatureHelp.js +53 -0
- package/vscode/src/vs/editor/contrib/peekView/browser/media/peekViewWidget.css.js +4 -0
- package/vscode/src/vs/editor/contrib/peekView/browser/peekView.js +286 -0
- package/vscode/src/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js +7 -7
- package/vscode/src/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +3 -3
- package/vscode/src/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +13 -13
- package/vscode/src/vs/editor/contrib/readOnlyMessage/browser/contribution.js +38 -0
- package/vscode/src/vs/editor/contrib/rename/browser/rename.js +382 -0
- package/vscode/src/vs/editor/contrib/rename/browser/renameInputField.css.js +4 -0
- package/vscode/src/vs/editor/contrib/rename/browser/renameInputField.js +173 -0
- package/vscode/src/vs/editor/contrib/semanticTokens/browser/documentSemanticTokens.js +332 -0
- package/vscode/src/vs/editor/contrib/semanticTokens/browser/viewportSemanticTokens.js +124 -0
- package/vscode/src/vs/editor/contrib/semanticTokens/common/getSemanticTokens.js +190 -0
- package/vscode/src/vs/editor/contrib/semanticTokens/common/semanticTokensConfig.js +9 -0
- package/vscode/src/vs/editor/contrib/smartSelect/browser/bracketSelections.js +136 -0
- package/vscode/src/vs/editor/contrib/smartSelect/browser/smartSelect.js +280 -0
- package/vscode/src/vs/editor/contrib/smartSelect/browser/wordSelections.js +70 -0
- package/vscode/src/vs/editor/contrib/snippet/browser/snippetController2.js +287 -0
- package/vscode/src/vs/editor/contrib/snippet/browser/snippetParser.js +901 -0
- package/vscode/src/vs/editor/contrib/snippet/browser/snippetSession.css.js +4 -0
- package/vscode/src/vs/editor/contrib/snippet/browser/snippetSession.js +579 -0
- package/vscode/src/vs/editor/contrib/snippet/browser/snippetVariables.js +394 -0
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScroll.css.js +4 -0
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +173 -0
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollContribution.js +11 -0
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +488 -0
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollElement.js +25 -0
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollModelProvider.js +317 -0
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollProvider.js +145 -0
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +428 -0
- package/vscode/src/vs/editor/contrib/suggest/browser/completionModel.js +190 -0
- package/vscode/src/vs/editor/contrib/suggest/browser/media/suggest.css.js +4 -0
- package/vscode/src/vs/editor/contrib/suggest/browser/suggest.js +355 -0
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestAlternatives.js +78 -0
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestCommitCharacters.js +50 -0
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestController.js +887 -0
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js +193 -0
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestMemory.js +230 -0
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestModel.js +594 -0
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestOvertypingCapturer.js +54 -0
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidget.js +875 -0
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +364 -0
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +202 -0
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetStatus.js +81 -0
- package/vscode/src/vs/editor/contrib/suggest/browser/wordContextKey.js +53 -0
- package/vscode/src/vs/editor/contrib/suggest/browser/wordDistance.js +57 -0
- package/vscode/src/vs/editor/contrib/symbolIcons/browser/symbolIcons.css.js +4 -0
- package/vscode/src/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +333 -0
- package/vscode/src/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +45 -0
- package/vscode/src/vs/editor/contrib/tokenization/browser/tokenization.js +29 -0
- package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/bannerController.css.js +4 -0
- package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +105 -0
- package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.css.js +4 -0
- package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +755 -0
- package/vscode/src/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +114 -0
- package/vscode/src/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.css.js +4 -0
- package/vscode/src/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +130 -0
- package/vscode/src/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +719 -0
- package/vscode/src/vs/editor/contrib/wordOperations/browser/wordOperations.js +442 -0
- package/vscode/src/vs/editor/contrib/wordPartOperations/browser/wordPartOperations.js +137 -0
- package/vscode/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.css.js +4 -0
- package/vscode/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.js +396 -0
- package/vscode/src/vs/editor/editor.api.d.ts +8000 -0
- package/vscode/src/vs/editor/editor.worker.js +21 -0
- package/vscode/src/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.css.js +4 -0
- package/vscode/src/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js +67 -0
- package/vscode/src/vs/editor/standalone/browser/quickInput/standaloneQuickInput.css.js +4 -0
- package/vscode/src/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.js +153 -0
- package/vscode/src/vs/editor/standalone/browser/standaloneCodeEditor.d.ts +5 -5
- package/vscode/src/vs/editor/standalone/browser/standaloneCodeEditor.js +296 -0
- package/vscode/src/vs/editor/standalone/browser/standaloneCodeEditorService.js +81 -0
- package/vscode/src/vs/editor/standalone/browser/standaloneEditor.d.ts +1 -0
- package/vscode/src/vs/editor/standalone/browser/standaloneLayoutService.js +59 -0
- package/vscode/src/vs/editor/standalone/browser/standaloneServices.d.ts +2 -2
- package/vscode/src/vs/editor/standalone/browser/standaloneServices.js +968 -0
- package/vscode/src/vs/editor/standalone/browser/standaloneThemeService.js +345 -0
- package/vscode/src/vs/editor/standalone/common/standaloneTheme.js +3 -0
- package/vscode/src/vs/editor/standalone/common/themes.js +218 -0
- package/vscode/src/vs/nls.js +51 -0
- package/vscode/src/vs/platform/accessibility/browser/accessibilityService.js +90 -0
- package/vscode/src/vs/platform/accessibility/common/accessibility.js +11 -0
- package/vscode/src/vs/platform/action/common/action.js +10 -0
- package/vscode/src/vs/platform/action/common/actionCommonCategories.js +18 -0
- package/vscode/src/vs/platform/actionWidget/browser/actionList.js +276 -0
- package/vscode/src/vs/platform/actionWidget/browser/actionWidget.css.js +4 -0
- package/vscode/src/vs/platform/actionWidget/browser/actionWidget.js +258 -0
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +11 -11
- package/vscode/src/vs/platform/actions/browser/dropdownWithPrimaryActionViewItem.js +16 -16
- package/vscode/src/vs/platform/actions/browser/floatingMenu.js +9 -9
- package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.css.js +4 -0
- package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.js +454 -0
- package/vscode/src/vs/platform/actions/browser/toolbar.js +190 -0
- package/vscode/src/vs/platform/actions/common/actions.js +385 -0
- package/vscode/src/vs/platform/actions/common/menuService.js +377 -0
- package/vscode/src/vs/platform/audioCues/browser/audioCueService.js +430 -0
- package/vscode/src/vs/platform/clipboard/browser/clipboardService.js +103 -0
- package/vscode/src/vs/platform/clipboard/common/clipboardService.js +3 -0
- package/vscode/src/vs/platform/commands/common/commands.js +74 -0
- package/vscode/src/vs/platform/configuration/common/configuration.js +113 -0
- package/vscode/src/vs/platform/configuration/common/configurationModels.js +1023 -0
- package/vscode/src/vs/platform/configuration/common/configurationRegistry.js +506 -0
- package/vscode/src/vs/platform/configuration/common/configurations.js +160 -0
- package/vscode/src/vs/platform/contextkey/browser/contextKeyService.js +505 -0
- package/vscode/src/vs/platform/contextkey/common/contextkey.js +1611 -0
- package/vscode/src/vs/platform/contextkey/common/contextkeys.js +51 -0
- package/vscode/src/vs/platform/contextkey/common/scanner.js +284 -0
- package/vscode/src/vs/platform/contextview/browser/contextMenuHandler.js +117 -0
- package/vscode/src/vs/platform/contextview/browser/contextMenuService.js +94 -0
- package/vscode/src/vs/platform/contextview/browser/contextView.js +4 -0
- package/vscode/src/vs/platform/contextview/browser/contextViewService.js +59 -0
- package/vscode/src/vs/platform/debug/common/extensionHostDebug.js +1 -1
- package/vscode/src/vs/platform/diagnostics/common/diagnostics.js +1 -1
- package/vscode/src/vs/platform/dialogs/common/dialogs.js +4 -4
- package/vscode/src/vs/platform/dnd/browser/dnd.js +272 -0
- package/vscode/src/vs/platform/download/common/download.js +1 -1
- package/vscode/src/vs/platform/editor/common/editor.js +22 -0
- package/vscode/src/vs/platform/encryption/common/encryptionService.js +1 -1
- package/vscode/src/vs/platform/environment/common/environment.js +3 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionEnablementService.js +4 -4
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +2 -2
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementUtil.js +6 -6
- package/vscode/src/vs/platform/extensionManagement/common/extensionNls.js +2 -2
- package/vscode/src/vs/platform/extensionManagement/common/extensionStorage.js +8 -8
- package/vscode/src/vs/platform/extensionManagement/common/implicitActivationEvents.js +2 -2
- package/vscode/src/vs/platform/extensionRecommendations/common/extensionRecommendations.js +1 -1
- package/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.js +6 -6
- package/vscode/src/vs/platform/extensions/common/extensionValidator.js +21 -21
- package/vscode/src/vs/platform/extensions/common/extensions.js +128 -0
- package/vscode/src/vs/platform/externalServices/common/serviceMachineId.js +2 -2
- package/vscode/src/vs/platform/files/browser/htmlFileSystemProvider.js +343 -0
- package/vscode/src/vs/platform/files/browser/webFileSystemAccess.js +27 -0
- package/vscode/src/vs/platform/files/common/files.js +395 -0
- package/vscode/src/vs/platform/files/common/inMemoryFilesystemProvider.js +24 -24
- package/vscode/src/vs/platform/files/common/watcher.js +4 -4
- package/vscode/src/vs/platform/history/browser/contextScopedHistoryWidget.js +106 -0
- package/vscode/src/vs/platform/history/browser/historyWidgetKeybindingHint.js +4 -0
- package/vscode/src/vs/platform/instantiation/common/descriptors.js +8 -0
- package/vscode/src/vs/platform/instantiation/common/extensions.js +12 -0
- package/vscode/src/vs/platform/instantiation/common/graph.js +84 -0
- package/vscode/src/vs/platform/instantiation/common/instantiation.js +38 -0
- package/vscode/src/vs/platform/instantiation/common/instantiationService.js +314 -0
- package/vscode/src/vs/platform/instantiation/common/serviceCollection.js +20 -0
- package/vscode/src/vs/platform/jsonschemas/common/jsonContributionRegistry.js +33 -0
- package/vscode/src/vs/platform/keybinding/common/abstractKeybindingService.js +305 -0
- package/vscode/src/vs/platform/keybinding/common/baseResolvedKeybinding.js +57 -0
- package/vscode/src/vs/platform/keybinding/common/keybinding.js +3 -0
- package/vscode/src/vs/platform/keybinding/common/keybindingResolver.js +274 -0
- package/vscode/src/vs/platform/keybinding/common/keybindingsRegistry.js +118 -0
- package/vscode/src/vs/platform/keybinding/common/resolvedKeybindingItem.js +29 -0
- package/vscode/src/vs/platform/keybinding/common/usLayoutResolvedKeybinding.js +166 -0
- package/vscode/src/vs/platform/keyboardLayout/common/keyboardLayout.js +1 -1
- package/vscode/src/vs/platform/label/common/label.js +3 -0
- package/vscode/src/vs/platform/languagePacks/common/languagePacks.js +1 -1
- package/vscode/src/vs/platform/layout/browser/layoutService.js +3 -0
- package/vscode/src/vs/platform/layout/browser/zIndexRegistry.js +2 -2
- package/vscode/src/vs/platform/list/browser/listService.js +1175 -0
- package/vscode/src/vs/platform/log/common/bufferLog.js +1 -1
- package/vscode/src/vs/platform/log/common/log.js +413 -0
- package/vscode/src/vs/platform/log/common/logService.js +37 -0
- package/vscode/src/vs/platform/markers/common/markerService.js +285 -0
- package/vscode/src/vs/platform/markers/common/markers.js +111 -0
- package/vscode/src/vs/platform/notification/common/notification.js +41 -0
- package/vscode/src/vs/platform/opener/browser/link.css.js +4 -0
- package/vscode/src/vs/platform/opener/browser/link.js +85 -0
- package/vscode/src/vs/platform/opener/common/opener.js +20 -0
- package/vscode/src/vs/platform/policy/common/policy.js +12 -0
- package/vscode/src/vs/platform/product/common/product.js +48 -0
- package/vscode/src/vs/platform/product/common/productService.js +4 -0
- package/vscode/src/vs/platform/progress/common/progress.js +130 -0
- package/vscode/src/vs/platform/quickinput/browser/media/quickInput.css.js +4 -0
- package/vscode/src/vs/platform/quickinput/browser/pickerQuickAccess.js +4 -4
- package/vscode/src/vs/platform/quickinput/browser/quickAccess.js +149 -0
- package/vscode/src/vs/platform/quickinput/browser/quickInput.js +993 -0
- package/vscode/src/vs/platform/quickinput/browser/quickInputBox.js +88 -0
- package/vscode/src/vs/platform/quickinput/browser/quickInputController.js +676 -0
- package/vscode/src/vs/platform/quickinput/browser/quickInputList.js +878 -0
- package/vscode/src/vs/platform/quickinput/browser/quickInputService.js +178 -0
- package/vscode/src/vs/platform/quickinput/browser/quickInputUtils.js +72 -0
- package/vscode/src/vs/platform/quickinput/browser/quickPickPin.js +3 -3
- package/vscode/src/vs/platform/quickinput/common/quickAccess.js +51 -0
- package/vscode/src/vs/platform/quickinput/common/quickInput.js +42 -0
- package/vscode/src/vs/platform/registry/common/platform.js +21 -0
- package/vscode/src/vs/platform/remote/common/remoteAgentConnection.js +14 -14
- package/vscode/src/vs/platform/remote/common/remoteAuthorityResolver.js +2 -2
- package/vscode/src/vs/platform/remote/common/remoteExtensionsScanner.js +1 -1
- package/vscode/src/vs/platform/remote/common/remoteHosts.js +40 -0
- package/vscode/src/vs/platform/remote/common/remoteSocketFactoryService.js +2 -2
- package/vscode/src/vs/platform/request/common/request.js +6 -6
- package/vscode/src/vs/platform/secrets/common/secrets.js +1 -1
- package/vscode/src/vs/platform/severityIcon/browser/media/severityIcon.css.js +4 -0
- package/vscode/src/vs/platform/severityIcon/browser/severityIcon.js +23 -0
- package/vscode/src/vs/platform/sign/common/sign.js +1 -1
- package/vscode/src/vs/platform/storage/common/storage.js +52 -7
- package/vscode/src/vs/platform/telemetry/common/telemetry.js +8 -0
- package/vscode/src/vs/platform/telemetry/common/telemetryUtils.js +3 -3
- package/vscode/src/vs/platform/terminal/common/capabilities/bufferMarkCapability.js +2 -2
- package/vscode/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.js +5 -5
- package/vscode/src/vs/platform/terminal/common/capabilities/cwdDetectionCapability.js +2 -2
- package/vscode/src/vs/platform/terminal/common/capabilities/partialCommandDetectionCapability.js +2 -2
- package/vscode/src/vs/platform/terminal/common/capabilities/terminalCapabilityStore.js +2 -2
- package/vscode/src/vs/platform/terminal/common/terminal.js +2 -2
- package/vscode/src/vs/platform/terminal/common/terminalEnvironment.js +1 -1
- package/vscode/src/vs/platform/terminal/common/xterm/shellIntegrationAddon.js +3 -3
- package/vscode/src/vs/platform/theme/browser/defaultStyles.js +169 -0
- package/vscode/src/vs/platform/theme/browser/iconsStyleSheet.js +64 -0
- package/vscode/src/vs/platform/theme/common/colorRegistry.js +1297 -0
- package/vscode/src/vs/platform/theme/common/iconRegistry.js +206 -0
- package/vscode/src/vs/platform/theme/common/theme.js +14 -0
- package/vscode/src/vs/platform/theme/common/themeService.js +71 -0
- package/vscode/src/vs/platform/theme/common/tokenClassificationRegistry.js +128 -118
- package/vscode/src/vs/platform/tunnel/common/tunnel.js +2 -2
- package/vscode/src/vs/platform/undoRedo/common/undoRedo.js +37 -0
- package/vscode/src/vs/platform/undoRedo/common/undoRedoService.js +1188 -0
- package/vscode/src/vs/platform/update/common/update.js +1 -1
- package/vscode/src/vs/platform/uriIdentity/common/uriIdentity.js +3 -0
- package/vscode/src/vs/platform/uriIdentity/common/uriIdentityService.js +4 -4
- package/vscode/src/vs/platform/url/common/url.js +1 -1
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfile.js +459 -0
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfileIpc.js +3 -3
- package/vscode/src/vs/platform/userDataSync/common/ignoredExtensions.js +3 -3
- package/vscode/src/vs/platform/userDataSync/common/settingsMerge.js +5 -5
- package/vscode/src/vs/platform/userDataSync/common/userDataSync.js +7 -7
- package/vscode/src/vs/platform/userDataSync/common/userDataSyncAccount.js +3 -3
- package/vscode/src/vs/platform/userDataSync/common/userDataSyncMachines.js +10 -10
- package/vscode/src/vs/platform/window/common/window.js +1 -1
- package/vscode/src/vs/platform/workspace/common/canonicalUri.js +1 -1
- package/vscode/src/vs/platform/workspace/common/editSessions.js +1 -1
- package/vscode/src/vs/platform/workspace/common/virtualWorkspace.js +1 -1
- package/vscode/src/vs/platform/workspace/common/workspace.js +170 -0
- package/vscode/src/vs/platform/workspace/common/workspaceTrust.js +18 -0
- package/vscode/src/vs/platform/workspaces/common/workspaces.js +12 -12
- package/vscode/src/vs/workbench/api/browser/statusBarExtensionPoint.js +10 -10
- package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +23 -23
- package/vscode/src/vs/workbench/api/common/extHost.common.services.js +24 -24
- package/vscode/src/vs/workbench/api/common/extHostApiCommands.js +7 -7
- package/vscode/src/vs/workbench/api/common/extHostApiDeprecationService.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostAuthentication.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostChat.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +9 -9
- package/vscode/src/vs/workbench/api/common/extHostChatProvider.js +6 -6
- package/vscode/src/vs/workbench/api/common/extHostChatVariables.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostCodeInsets.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostCommands.js +14 -14
- package/vscode/src/vs/workbench/api/common/extHostComments.js +16 -21
- package/vscode/src/vs/workbench/api/common/extHostConfiguration.js +9 -9
- package/vscode/src/vs/workbench/api/common/extHostConsoleForwarder.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostCustomEditors.js +6 -6
- package/vscode/src/vs/workbench/api/common/extHostDebugService.js +4 -4
- package/vscode/src/vs/workbench/api/common/extHostDecorations.js +6 -6
- package/vscode/src/vs/workbench/api/common/extHostDiagnostics.js +6 -6
- package/vscode/src/vs/workbench/api/common/extHostDialogs.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostDocumentContentProviders.js +5 -5
- package/vscode/src/vs/workbench/api/common/extHostDocumentData.js +6 -6
- package/vscode/src/vs/workbench/api/common/extHostDocumentSaveParticipant.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostDocuments.js +6 -6
- package/vscode/src/vs/workbench/api/common/extHostDocumentsAndEditors.js +13 -13
- package/vscode/src/vs/workbench/api/common/extHostEditorTabs.js +5 -5
- package/vscode/src/vs/workbench/api/common/extHostExtensionActivator.js +5 -5
- package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +35 -35
- package/vscode/src/vs/workbench/api/common/extHostFileSystem.js +6 -6
- package/vscode/src/vs/workbench/api/common/extHostFileSystemConsumer.js +24 -24
- package/vscode/src/vs/workbench/api/common/extHostFileSystemEventService.js +4 -4
- package/vscode/src/vs/workbench/api/common/extHostFileSystemInfo.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostInitDataService.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostInlineChat.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostInteractive.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostLabelService.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +20 -20
- package/vscode/src/vs/workbench/api/common/extHostLanguages.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostLocalizationService.js +5 -5
- package/vscode/src/vs/workbench/api/common/extHostLogService.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostLoggerService.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostManagedSockets.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostMemento.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostMessageService.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostNotebook.js +22 -22
- package/vscode/src/vs/workbench/api/common/extHostNotebookDocument.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostNotebookDocumentSaveParticipant.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostNotebookDocuments.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostNotebookEditor.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostNotebookEditors.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostNotebookKernels.js +9 -9
- package/vscode/src/vs/workbench/api/common/extHostNotebookRenderers.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostOutput.js +8 -8
- package/vscode/src/vs/workbench/api/common/extHostProfileContentHandler.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostProgress.js +5 -5
- package/vscode/src/vs/workbench/api/common/extHostQuickDiff.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostQuickOpen.js +8 -8
- package/vscode/src/vs/workbench/api/common/extHostRequireInterceptor.js +8 -8
- package/vscode/src/vs/workbench/api/common/extHostRpcService.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostSCM.js +12 -12
- package/vscode/src/vs/workbench/api/common/extHostSearch.js +4 -4
- package/vscode/src/vs/workbench/api/common/extHostSecretState.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostSecrets.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostShare.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostSpeech.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostStatusBar.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostStorage.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostStoragePaths.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostTask.js +10 -10
- package/vscode/src/vs/workbench/api/common/extHostTelemetry.js +8 -8
- package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +10 -10
- package/vscode/src/vs/workbench/api/common/extHostTestItem.js +5 -5
- package/vscode/src/vs/workbench/api/common/extHostTesting.js +10 -10
- package/vscode/src/vs/workbench/api/common/extHostTextEditor.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostTextEditors.js +5 -5
- package/vscode/src/vs/workbench/api/common/extHostTheming.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostTimeline.js +4 -4
- package/vscode/src/vs/workbench/api/common/extHostTreeViews.js +11 -11
- package/vscode/src/vs/workbench/api/common/extHostTunnelService.js +9 -9
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +31 -31
- package/vscode/src/vs/workbench/api/common/extHostTypes.js +11 -11
- package/vscode/src/vs/workbench/api/common/extHostUriOpener.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostUriTransformerService.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostUrls.js +4 -4
- package/vscode/src/vs/workbench/api/common/extHostVariableResolverService.js +10 -10
- package/vscode/src/vs/workbench/api/common/extHostWebview.js +6 -6
- package/vscode/src/vs/workbench/api/common/extHostWebviewMessaging.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostWebviewPanels.js +4 -4
- package/vscode/src/vs/workbench/api/common/extHostWebviewView.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostWindow.js +5 -5
- package/vscode/src/vs/workbench/api/common/extHostWorkspace.js +17 -17
- package/vscode/src/vs/workbench/api/common/extensionHostMain.js +14 -14
- package/vscode/src/vs/workbench/api/common/jsonValidationExtensionPoint.js +14 -14
- package/vscode/src/vs/workbench/api/worker/extHost.worker.services.js +2 -2
- package/vscode/src/vs/workbench/api/worker/extHostExtensionService.js +3 -3
- package/vscode/src/vs/workbench/api/worker/extensionHostWorker.js +9 -9
- package/vscode/src/vs/workbench/browser/actions/layoutActions.js +18 -18
- package/vscode/src/vs/workbench/browser/actions/widgetNavigationCommands.js +5 -5
- package/vscode/src/vs/workbench/browser/actions/windowActions.js +24 -24
- package/vscode/src/vs/workbench/browser/actions/workspaceActions.js +8 -8
- package/vscode/src/vs/workbench/browser/actions/workspaceCommands.js +14 -14
- package/vscode/src/vs/workbench/browser/actions.js +5 -5
- package/vscode/src/vs/workbench/browser/codeeditor.js +10 -10
- package/vscode/src/vs/workbench/browser/composite.js +5 -5
- package/vscode/src/vs/workbench/browser/dnd.js +20 -21
- package/vscode/src/vs/workbench/browser/editor.js +7 -7
- package/vscode/src/vs/workbench/browser/labels.js +16 -16
- package/vscode/src/vs/workbench/browser/panecomposite.js +9 -9
- package/vscode/src/vs/workbench/browser/part.js +4 -4
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions.js +6 -6
- package/vscode/src/vs/workbench/browser/parts/compositeBarActions.js +17 -17
- package/vscode/src/vs/workbench/browser/parts/editor/binaryDiffEditor.js +7 -7
- package/vscode/src/vs/workbench/browser/parts/editor/binaryEditor.js +4 -4
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbs.js +5 -5
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +14 -14
- package/vscode/src/vs/workbench/browser/parts/editor/editor.js +4 -4
- package/vscode/src/vs/workbench/browser/parts/editor/editorActions.js +16 -16
- package/vscode/src/vs/workbench/browser/parts/editor/editorAutoSave.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/editor/editorCommands.js +23 -23
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +7 -7
- package/vscode/src/vs/workbench/browser/parts/editor/editorPane.js +7 -7
- package/vscode/src/vs/workbench/browser/parts/editor/editorPlaceholder.js +17 -17
- package/vscode/src/vs/workbench/browser/parts/editor/editorQuickAccess.js +8 -8
- package/vscode/src/vs/workbench/browser/parts/editor/editorStatus.js +34 -34
- package/vscode/src/vs/workbench/browser/parts/editor/editorTabsControl.js +23 -23
- package/vscode/src/vs/workbench/browser/parts/editor/editorWithViewState.js +7 -7
- package/vscode/src/vs/workbench/browser/parts/editor/editorsObserver.js +7 -7
- package/vscode/src/vs/workbench/browser/parts/editor/sideBySideEditor.js +15 -15
- package/vscode/src/vs/workbench/browser/parts/editor/textCodeEditor.js +5 -5
- package/vscode/src/vs/workbench/browser/parts/editor/textDiffEditor.js +17 -17
- package/vscode/src/vs/workbench/browser/parts/editor/textEditor.js +11 -11
- package/vscode/src/vs/workbench/browser/parts/editor/textResourceEditor.js +10 -10
- package/vscode/src/vs/workbench/browser/parts/globalCompositeBar.js +20 -20
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCommands.js +14 -14
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsTelemetry.js +4 -4
- package/vscode/src/vs/workbench/browser/parts/panel/panelActions.js +7 -7
- package/vscode/src/vs/workbench/browser/parts/titlebar/menubarControl.js +26 -26
- package/vscode/src/vs/workbench/browser/parts/titlebar/titlebarPart.d.ts +1 -0
- package/vscode/src/vs/workbench/browser/parts/titlebar/windowTitle.js +14 -14
- package/vscode/src/vs/workbench/browser/parts/views/checkbox.js +9 -9
- package/vscode/src/vs/workbench/browser/parts/views/treeView.js +64 -64
- package/vscode/src/vs/workbench/browser/parts/views/viewFilter.js +26 -26
- package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +36 -36
- package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.js +26 -26
- package/vscode/src/vs/workbench/browser/parts/views/viewsService.js +15 -15
- package/vscode/src/vs/workbench/browser/parts/views/viewsViewlet.d.ts +1 -0
- package/vscode/src/vs/workbench/browser/parts/views/viewsViewlet.js +7 -7
- package/vscode/src/vs/workbench/browser/quickaccess.js +4 -4
- package/vscode/src/vs/workbench/browser/style.js +6 -6
- package/vscode/src/vs/workbench/browser/window.js +4 -4
- package/vscode/src/vs/workbench/browser/workbench.contribution.js +5 -5
- package/vscode/src/vs/workbench/common/component.js +1 -1
- package/vscode/src/vs/workbench/common/configuration.js +6 -6
- package/vscode/src/vs/workbench/common/contextkeys.js +9 -9
- package/vscode/src/vs/workbench/common/contributions.js +6 -6
- package/vscode/src/vs/workbench/common/editor/binaryEditorModel.js +2 -2
- package/vscode/src/vs/workbench/common/editor/diffEditorInput.js +3 -3
- package/vscode/src/vs/workbench/common/editor/editorGroupModel.js +6 -6
- package/vscode/src/vs/workbench/common/editor/editorInput.js +3 -3
- package/vscode/src/vs/workbench/common/editor/editorModel.js +2 -2
- package/vscode/src/vs/workbench/common/editor/resourceEditorInput.js +3 -3
- package/vscode/src/vs/workbench/common/editor/sideBySideEditorInput.js +3 -3
- package/vscode/src/vs/workbench/common/editor/textEditorModel.js +7 -7
- package/vscode/src/vs/workbench/common/editor/textResourceEditorInput.d.ts +1 -0
- package/vscode/src/vs/workbench/common/editor/textResourceEditorInput.js +6 -6
- package/vscode/src/vs/workbench/common/editor/textResourceEditorModel.js +3 -3
- package/vscode/src/vs/workbench/common/editor.d.ts +1 -0
- package/vscode/src/vs/workbench/common/editor.js +11 -11
- package/vscode/src/vs/workbench/common/memento.js +2 -2
- package/vscode/src/vs/workbench/common/notifications.js +8 -8
- package/vscode/src/vs/workbench/common/resources.js +12 -12
- package/vscode/src/vs/workbench/common/theme.js +4 -4
- package/vscode/src/vs/workbench/common/views.d.ts +1 -0
- package/vscode/src/vs/workbench/common/views.js +10 -10
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +4 -4
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityContributions.js +17 -16
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleView.js +28 -28
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/accessibility/browser/editorAccessibilityHelp.js +11 -11
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkCellEdits.js +5 -5
- package/vscode/src/vs/workbench/contrib/callHierarchy/common/callHierarchy.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorInput.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatFollowups.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +31 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +74 -74
- package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOptions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommandContentWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +21 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.js +34 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatContributionService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/common/chatParserTypes.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatRequestParser.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/common/chatService.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatVariables.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatViewModel.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.js +3 -3
- package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActions.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +17 -17
- package/vscode/src/vs/workbench/contrib/codeActions/browser/documentationContribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeActions/common/codeActionsExtensionPoint.js +6 -6
- package/vscode/src/vs/workbench/contrib/codeActions/common/documentationExtensionPoint.js +7 -7
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +15 -14
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/editorFeatures.js +6 -6
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/editorLineNumberMenu.js +9 -9
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +31 -31
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens.js +34 -34
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint.js +79 -79
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.js +10 -10
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/menuPreventer.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.js +16 -16
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +19 -19
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/simpleEditorOptions.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.js +25 -25
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.js +5 -5
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +6 -6
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.js +5 -5
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.js +5 -5
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +17 -17
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/workbenchReferenceSearch.js +8 -8
- package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +15 -15
- package/vscode/src/vs/workbench/contrib/comments/browser/commentFormActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +61 -61
- package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +23 -23
- package/vscode/src/vs/workbench/contrib/comments/browser/commentService.js +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadAdditionalActions.js +5 -5
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +21 -21
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +21 -21
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +18 -18
- package/vscode/src/vs/workbench/contrib/comments/browser/comments.contribution.js +41 -41
- package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +14 -14
- package/vscode/src/vs/workbench/contrib/comments/browser/simpleCommentEditor.js +15 -15
- package/vscode/src/vs/workbench/contrib/comments/browser/timestamp.js +4 -4
- package/vscode/src/vs/workbench/contrib/comments/common/commentContextKeys.js +11 -11
- package/vscode/src/vs/workbench/contrib/contextmenu/browser/contextmenu.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInput.js +9 -9
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +5 -5
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +71 -71
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +37 -37
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +92 -92
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +11 -11
- package/vscode/src/vs/workbench/contrib/debug/browser/debugColors.js +6 -6
- package/vscode/src/vs/workbench/contrib/debug/browser/debugIcons.js +3 -3
- package/vscode/src/vs/workbench/contrib/debug/common/abstractDebugAdapter.js +3 -3
- package/vscode/src/vs/workbench/contrib/debug/common/debug.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debug.js +57 -57
- package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +27 -27
- package/vscode/src/vs/workbench/contrib/debug/common/debugSource.js +8 -8
- package/vscode/src/vs/workbench/contrib/debug/common/debugUtils.js +8 -8
- package/vscode/src/vs/workbench/contrib/debug/common/disassemblyViewInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +43 -43
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsIcons.js +3 -3
- package/vscode/src/vs/workbench/contrib/extensions/common/extensions.js +4 -4
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionsFileTemplate.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionsInput.js +4 -4
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionsUtils.js +6 -6
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/configuration.js +7 -7
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService.js +22 -22
- package/vscode/src/vs/workbench/contrib/files/browser/explorerFileContrib.js +1 -1
- package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +20 -20
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +132 -132
- package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +8 -8
- package/vscode/src/vs/workbench/contrib/files/browser/fileImportExport.js +26 -26
- package/vscode/src/vs/workbench/contrib/files/browser/files.contribution.js +109 -107
- package/vscode/src/vs/workbench/contrib/files/browser/files.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/files/browser/files.js +6 -6
- package/vscode/src/vs/workbench/contrib/files/browser/views/emptyView.js +15 -15
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerDecorationsProvider.js +6 -6
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerView.js +42 -42
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.js +45 -45
- package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +41 -41
- package/vscode/src/vs/workbench/contrib/files/common/explorerModel.js +11 -11
- package/vscode/src/vs/workbench/contrib/files/common/files.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/files/common/files.js +8 -8
- package/vscode/src/vs/workbench/contrib/folding/browser/folding.contribution.js +10 -10
- package/vscode/src/vs/workbench/contrib/format/browser/formatActionsMultiple.js +41 -41
- package/vscode/src/vs/workbench/contrib/format/browser/formatActionsNone.js +11 -11
- package/vscode/src/vs/workbench/contrib/format/browser/formatModified.js +14 -14
- package/vscode/src/vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty.js +16 -16
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +32 -32
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatLivePreviewWidget.js +37 -37
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +19 -19
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +26 -26
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +38 -38
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +7 -7
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveDocumentService.js +1 -1
- package/vscode/src/vs/workbench/contrib/list/browser/list.contribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/markdown/browser/markdownDocumentRenderer.js +8 -8
- package/vscode/src/vs/workbench/contrib/markers/common/markers.js +1 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +9 -9
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +14 -12
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/diffComputer.js +3 -3
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/editing.js +2 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/lineRange.js +3 -3
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mapping.js +5 -5
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +10 -7
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange.js +5 -5
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/rangeUtils.js +2 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +6 -4
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/telemetry.js +1 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/utils.js +6 -5
- package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findFilters.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findModel.js +6 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +52 -52
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +13 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +21 -21
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +74 -74
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorService.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellPart.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDecorations.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.js +16 -16
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDragRenderer.js +11 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellExecution.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocus.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocusIndicator.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.js +35 -35
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellProgressBar.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.js +23 -23
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbarStickyScroll.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.js +12 -12
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatController.js +19 -19
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +35 -35
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.js +11 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellInput.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput.js +11 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.js +11 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.js +33 -33
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.js +17 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellListView.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +38 -38
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.js +57 -57
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/OutlineEntry.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.js +6 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellEditorOptions.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputViewModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellSelectionCollection.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.js +9 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/eventDispatcher.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/foldingModel.js +6 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineProvider.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.js +15 -15
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +17 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.js +16 -16
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorWidgetContextKeys.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.js +16 -16
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.js +8 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookOverviewRuler.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellOutputTextModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.js +9 -9
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookCellStatusBarService.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +11 -11
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookContextKeys.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.js +9 -9
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +8 -8
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverService.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionService.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionStateService.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookKernelService.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookKeymapService.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookLoggingService.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookRendererMessagingService.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookService.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookWorkerService.js +1 -1
- package/vscode/src/vs/workbench/contrib/output/common/outputChannelModel.js +17 -17
- package/vscode/src/vs/workbench/contrib/output/common/outputChannelModelService.js +3 -3
- package/vscode/src/vs/workbench/contrib/preferences/common/preferences.js +3 -3
- package/vscode/src/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +3 -3
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +31 -31
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteIcons.js +20 -20
- package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +104 -104
- package/vscode/src/vs/workbench/contrib/remote/browser/urlFinder.js +2 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtyDiffSwitcher.js +10 -10
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +61 -61
- package/vscode/src/vs/workbench/contrib/scm/common/quickDiff.js +1 -1
- package/vscode/src/vs/workbench/contrib/scm/common/scm.js +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/searchNotebookHelpers.js +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/replace.js +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsBase.js +4 -4
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsFind.js +20 -20
- package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +26 -26
- package/vscode/src/vs/workbench/contrib/search/common/cellSearchModel.js +4 -4
- package/vscode/src/vs/workbench/contrib/search/common/constants.js +1 -1
- package/vscode/src/vs/workbench/contrib/search/common/notebookSearch.js +1 -1
- package/vscode/src/vs/workbench/contrib/search/common/search.js +9 -9
- package/vscode/src/vs/workbench/contrib/search/common/searchHistoryService.js +4 -4
- package/vscode/src/vs/workbench/contrib/search/common/searchNotebookHelpers.js +1 -1
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/constants.js +1 -1
- package/vscode/src/vs/workbench/contrib/share/common/share.js +1 -1
- package/vscode/src/vs/workbench/contrib/snippets/browser/commands/abstractSnippetsActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/snippets/browser/commands/fileTemplateSnippets.js +7 -7
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.js +11 -11
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippets.js +1 -1
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsFile.js +10 -10
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsService.js +21 -21
- package/vscode/src/vs/workbench/contrib/snippets/browser/tabCompletion.js +9 -9
- package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +1 -1
- package/vscode/src/vs/workbench/contrib/tasks/common/taskDefinitionRegistry.js +14 -14
- package/vscode/src/vs/workbench/contrib/tasks/common/taskService.js +8 -8
- package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +15 -15
- package/vscode/src/vs/workbench/contrib/terminal/browser/detachedTerminal.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +9 -9
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalExtensions.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIcon.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIcons.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProcessExtHostProxy.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.js +17 -17
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationStyles.js +9 -9
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.js +5 -5
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/suggestAddon.js +15 -15
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +27 -27
- package/vscode/src/vs/workbench/contrib/terminal/common/environmentVariable.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminal/common/terminal.js +9 -9
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +23 -23
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalContextKey.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalExtensionPoints.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/links/browser/links.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/quickFix/browser/quickFix.js +1 -1
- package/vscode/src/vs/workbench/contrib/testing/common/getComputedState.js +1 -1
- package/vscode/src/vs/workbench/contrib/testing/common/observableValue.js +2 -2
- package/vscode/src/vs/workbench/contrib/testing/common/storedValue.js +2 -2
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.js +3 -3
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverageService.js +7 -7
- package/vscode/src/vs/workbench/contrib/testing/common/testExplorerFilterState.js +5 -5
- package/vscode/src/vs/workbench/contrib/testing/common/testItemCollection.js +5 -5
- package/vscode/src/vs/workbench/contrib/testing/common/testProfileService.js +6 -6
- package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +9 -9
- package/vscode/src/vs/workbench/contrib/testing/common/testResultService.js +8 -8
- package/vscode/src/vs/workbench/contrib/testing/common/testResultStorage.js +10 -10
- package/vscode/src/vs/workbench/contrib/testing/common/testService.js +3 -3
- package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +3 -3
- package/vscode/src/vs/workbench/contrib/testing/common/testingContextKeys.js +2 -2
- package/vscode/src/vs/workbench/contrib/testing/common/testingContinuousRunService.js +6 -6
- package/vscode/src/vs/workbench/contrib/testing/common/testingDecorations.js +2 -2
- package/vscode/src/vs/workbench/contrib/testing/common/testingPeekOpener.js +1 -1
- package/vscode/src/vs/workbench/contrib/timeline/common/timeline.js +1 -1
- package/vscode/src/vs/workbench/contrib/typeHierarchy/common/typeHierarchy.js +12 -12
- package/vscode/src/vs/workbench/contrib/webview/browser/webview.js +6 -6
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewWindowDragMonitor.js +6 -6
- package/vscode/src/vs/workbench/contrib/webview/common/webview.js +2 -2
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditor.js +14 -14
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput.js +3 -3
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewIconManager.js +5 -5
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService.js +10 -10
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewService.js +4 -4
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/featuredExtensionService.js +7 -7
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedExtensionPoint.js +1 -1
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.js +18 -18
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.js +3 -3
- package/vscode/src/vs/workbench/services/activity/common/activity.js +1 -1
- package/vscode/src/vs/workbench/services/aiEmbeddingVector/common/aiEmbeddingVectorService.js +4 -4
- package/vscode/src/vs/workbench/services/aiRelatedInformation/common/aiRelatedInformation.js +1 -1
- package/vscode/src/vs/workbench/services/assignment/common/assignmentService.js +4 -4
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +30 -30
- package/vscode/src/vs/workbench/services/authentication/common/authentication.js +1 -1
- package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +12 -12
- package/vscode/src/vs/workbench/services/banner/browser/bannerService.js +1 -1
- package/vscode/src/vs/workbench/services/configuration/common/configuration.js +2 -2
- package/vscode/src/vs/workbench/services/configuration/common/jsonEditing.js +1 -1
- package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolver.js +1 -1
- package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverSchema.js +17 -17
- package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverUtils.js +2 -2
- package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +31 -31
- package/vscode/src/vs/workbench/services/decorations/common/decorations.js +1 -1
- package/vscode/src/vs/workbench/services/editor/browser/codeEditorService.js +5 -5
- package/vscode/src/vs/workbench/services/editor/browser/editorService.js +16 -16
- package/vscode/src/vs/workbench/services/editor/common/editorGroupColumn.d.ts +2 -0
- package/vscode/src/vs/workbench/services/editor/common/editorGroupFinder.js +2 -2
- package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.js +1 -1
- package/vscode/src/vs/workbench/services/editor/common/editorResolverService.js +9 -9
- package/vscode/src/vs/workbench/services/editor/common/editorService.js +1 -1
- package/vscode/src/vs/workbench/services/environment/browser/environmentService.js +10 -10
- package/vscode/src/vs/workbench/services/environment/common/environmentService.js +2 -2
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +12 -12
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagement.js +2 -2
- package/vscode/src/vs/workbench/services/extensionRecommendations/common/extensionRecommendations.js +1 -1
- package/vscode/src/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.js +13 -13
- package/vscode/src/vs/workbench/services/extensions/browser/extensionUrlHandler.js +18 -18
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.d.ts +1 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionDescriptionRegistry.js +6 -6
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostKind.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostProtocol.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionManifestPropertiesService.js +10 -10
- package/vscode/src/vs/workbench/services/extensions/common/extensions.js +4 -4
- package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +87 -87
- package/vscode/src/vs/workbench/services/extensions/common/lazyPromise.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/rpcProtocol.js +9 -9
- package/vscode/src/vs/workbench/services/extensions/common/workspaceContains.js +10 -10
- package/vscode/src/vs/workbench/services/files/common/elevatedFileService.js +1 -1
- package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +14 -14
- package/vscode/src/vs/workbench/services/history/common/history.js +1 -1
- package/vscode/src/vs/workbench/services/host/browser/host.js +1 -1
- package/vscode/src/vs/workbench/services/hover/browser/hover.js +1 -1
- package/vscode/src/vs/workbench/services/issue/common/issue.js +1 -1
- package/vscode/src/vs/workbench/services/keybinding/browser/unboundCommands.js +4 -4
- package/vscode/src/vs/workbench/services/keybinding/common/fallbackKeyboardMapper.js +2 -2
- package/vscode/src/vs/workbench/services/keybinding/common/keybindingEditing.d.ts +1 -0
- package/vscode/src/vs/workbench/services/keybinding/common/keybindingEditing.js +19 -19
- package/vscode/src/vs/workbench/services/language/common/languageService.js +8 -8
- package/vscode/src/vs/workbench/services/languageDetection/common/languageDetectionWorkerService.js +1 -1
- package/vscode/src/vs/workbench/services/languageStatus/common/languageStatusService.js +3 -3
- package/vscode/src/vs/workbench/services/layout/browser/layoutService.js +2 -2
- package/vscode/src/vs/workbench/services/lifecycle/common/lifecycle.js +1 -1
- package/vscode/src/vs/workbench/services/lifecycle/common/lifecycleService.js +6 -6
- package/vscode/src/vs/workbench/services/localization/common/locale.js +1 -1
- package/vscode/src/vs/workbench/services/outline/browser/outline.js +1 -1
- package/vscode/src/vs/workbench/services/output/common/output.js +4 -4
- package/vscode/src/vs/workbench/services/panecomposite/browser/panecomposite.js +1 -1
- package/vscode/src/vs/workbench/services/path/browser/pathService.js +4 -4
- package/vscode/src/vs/workbench/services/path/common/pathService.js +8 -8
- package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorInput.js +4 -4
- package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorModel.js +29 -29
- package/vscode/src/vs/workbench/services/preferences/common/preferences.d.ts +1 -0
- package/vscode/src/vs/workbench/services/preferences/common/preferences.js +1 -1
- package/vscode/src/vs/workbench/services/preferences/common/preferencesEditorInput.js +4 -4
- package/vscode/src/vs/workbench/services/preferences/common/preferencesModels.d.ts +1 -0
- package/vscode/src/vs/workbench/services/progress/browser/progressIndicator.js +3 -3
- package/vscode/src/vs/workbench/services/remote/common/remoteAgentService.js +2 -2
- package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.js +12 -12
- package/vscode/src/vs/workbench/services/remote/common/tunnelModel.js +20 -20
- package/vscode/src/vs/workbench/services/search/common/fileSearchManager.js +23 -23
- package/vscode/src/vs/workbench/services/search/common/ignoreFile.js +2 -2
- package/vscode/src/vs/workbench/services/search/common/queryBuilder.js +33 -33
- package/vscode/src/vs/workbench/services/search/common/replace.js +4 -4
- package/vscode/src/vs/workbench/services/search/common/search.js +18 -18
- package/vscode/src/vs/workbench/services/search/common/searchHelpers.js +1 -1
- package/vscode/src/vs/workbench/services/search/common/textSearchManager.js +13 -13
- package/vscode/src/vs/workbench/services/statusbar/browser/statusbar.js +1 -1
- package/vscode/src/vs/workbench/services/suggest/browser/simpleCompletionItem.js +1 -1
- package/vscode/src/vs/workbench/services/suggest/browser/simpleCompletionModel.js +2 -2
- package/vscode/src/vs/workbench/services/suggest/browser/simpleSuggestWidget.js +34 -34
- package/vscode/src/vs/workbench/services/suggest/browser/simpleSuggestWidgetRenderer.js +7 -7
- package/vscode/src/vs/workbench/services/terminal/common/embedderTerminalService.js +3 -3
- package/vscode/src/vs/workbench/services/textMate/browser/textMateTokenizationFeature.js +1 -1
- package/vscode/src/vs/workbench/services/textfile/common/encoding.js +3 -3
- package/vscode/src/vs/workbench/services/textfile/common/textEditorService.d.ts +1 -0
- package/vscode/src/vs/workbench/services/textfile/common/textEditorService.js +10 -10
- package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModel.js +16 -16
- package/vscode/src/vs/workbench/services/textfile/common/textfiles.js +4 -4
- package/vscode/src/vs/workbench/services/themes/common/colorExtensionPoint.js +20 -20
- package/vscode/src/vs/workbench/services/themes/common/hostColorSchemeService.js +1 -1
- package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +21 -21
- package/vscode/src/vs/workbench/services/themes/common/workbenchThemeService.js +3 -3
- package/vscode/src/vs/workbench/services/timer/browser/timerService.js +10 -10
- package/vscode/src/vs/workbench/services/title/browser/titleService.js +1 -1
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorHandler.js +5 -5
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorInput.js +5 -5
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorModel.d.ts +1 -0
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorModel.js +11 -11
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.js +7 -7
- package/vscode/src/vs/workbench/services/update/browser/updateService.d.ts +2 -0
- package/vscode/src/vs/workbench/services/url/browser/urlService.d.ts +1 -0
- package/vscode/src/vs/workbench/services/userActivity/common/userActivityService.js +4 -4
- package/vscode/src/vs/workbench/services/userData/browser/userDataInit.js +4 -4
- package/vscode/src/vs/workbench/services/userDataProfile/common/remoteUserDataProfiles.js +6 -6
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfile.d.ts +1 -0
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfile.js +6 -6
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfileIcons.js +3 -3
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfileService.js +5 -5
- package/vscode/src/vs/workbench/services/userDataSync/common/userDataSync.js +6 -6
- package/vscode/src/vs/workbench/services/views/browser/treeViewsService.js +1 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/resourceWorkingCopy.d.ts +1 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/resourceWorkingCopy.js +5 -5
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.d.ts +1 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.js +12 -12
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant.js +7 -7
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyBackup.js +1 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyEditorService.js +3 -3
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyFileOperationParticipant.js +4 -4
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyFileService.js +8 -8
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyHistory.js +1 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyService.js +5 -5
- package/vscode/src/vs/workbench/services/workspaces/browser/workspaces.js +1 -1
- package/vscode/src/vs/workbench/services/workspaces/common/workspaceEditing.js +1 -1
- package/vscode/src/vs/workbench/services/workspaces/common/workspaceTrust.js +14 -14
- package/workbench.js +2 -2
- package/workers/editor.worker.js +1 -0
- package/monaco-editor-treemending.patch +0 -46568
- package/monaco-treemending.js +0 -924
|
@@ -0,0 +1,1813 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import '../services/markerDecorations.js';
|
|
3
|
+
import './media/editor.css.js';
|
|
4
|
+
import { localizeWithPath } from '../../../nls.js';
|
|
5
|
+
import { DragAndDropObserver, getWindow, scheduleAtNextAnimationFrame, trackFocus } from '../../../base/browser/dom.js';
|
|
6
|
+
import { onUnexpectedError } from '../../../base/common/errors.js';
|
|
7
|
+
import { createEventDeliveryQueue, Emitter } from '../../../base/common/event.js';
|
|
8
|
+
import { hash } from '../../../base/common/hash.js';
|
|
9
|
+
import { Disposable, dispose } from '../../../base/common/lifecycle.js';
|
|
10
|
+
import { Schemas } from '../../../base/common/network.js';
|
|
11
|
+
import { EditorConfiguration } from '../config/editorConfiguration.js';
|
|
12
|
+
import { EditorExtensionsRegistry } from '../editorExtensions.js';
|
|
13
|
+
import { ICodeEditorService } from '../services/codeEditorService.js';
|
|
14
|
+
import { View } from '../view.js';
|
|
15
|
+
import { ViewUserInputEvents } from '../view/viewUserInputEvents.js';
|
|
16
|
+
import { filterValidationDecorations } from '../../common/config/editorOptions.js';
|
|
17
|
+
import { CursorColumns } from '../../common/core/cursorColumns.js';
|
|
18
|
+
import { Position } from '../../common/core/position.js';
|
|
19
|
+
import { Range } from '../../common/core/range.js';
|
|
20
|
+
import { Selection } from '../../common/core/selection.js';
|
|
21
|
+
import { InternalEditorAction } from '../../common/editorAction.js';
|
|
22
|
+
import { EditorType } from '../../common/editorCommon.js';
|
|
23
|
+
import { EditorContextKeys } from '../../common/editorContextKeys.js';
|
|
24
|
+
import { ModelDecorationOptions } from '../../common/model/textModel.js';
|
|
25
|
+
import { editorUnnecessaryCodeOpacity } from '../../common/core/editorColorRegistry.js';
|
|
26
|
+
import { editorErrorForeground, editorWarningForeground, editorInfoForeground, editorHintForeground } from '../../../platform/theme/common/colorRegistry.js';
|
|
27
|
+
import { ViewModel } from '../../common/viewModel/viewModelImpl.js';
|
|
28
|
+
import { ICommandService } from '../../../platform/commands/common/commands.js';
|
|
29
|
+
import { IContextKeyService } from '../../../platform/contextkey/common/contextkey.js';
|
|
30
|
+
import { IInstantiationService } from '../../../platform/instantiation/common/instantiation.js';
|
|
31
|
+
import { ServiceCollection } from '../../../platform/instantiation/common/serviceCollection.js';
|
|
32
|
+
import { Severity, INotificationService } from '../../../platform/notification/common/notification.js';
|
|
33
|
+
import { registerThemingParticipant, IThemeService } from '../../../platform/theme/common/themeService.js';
|
|
34
|
+
import { IAccessibilityService } from '../../../platform/accessibility/common/accessibility.js';
|
|
35
|
+
import { MonospaceLineBreaksComputerFactory } from '../../common/viewModel/monospaceLineBreaksComputer.js';
|
|
36
|
+
import { DOMLineBreaksComputerFactory } from '../view/domLineBreaksComputer.js';
|
|
37
|
+
import { WordOperations } from '../../common/cursor/cursorWordOperations.js';
|
|
38
|
+
import { ILanguageConfigurationService } from '../../common/languages/languageConfigurationRegistry.js';
|
|
39
|
+
import { applyFontInfo } from '../config/domFontInfo.js';
|
|
40
|
+
import { ILanguageFeaturesService } from '../../common/services/languageFeatures.js';
|
|
41
|
+
import { CodeEditorContributions } from './codeEditorContributions.js';
|
|
42
|
+
import { TabFocus } from '../config/tabFocus.js';
|
|
43
|
+
var CodeEditorWidget_1;
|
|
44
|
+
let EDITOR_ID = 0;
|
|
45
|
+
class ModelData {
|
|
46
|
+
constructor(model, viewModel, view, hasRealView, listenersToRemove, attachedView) {
|
|
47
|
+
this.model = model;
|
|
48
|
+
this.viewModel = viewModel;
|
|
49
|
+
this.view = view;
|
|
50
|
+
this.hasRealView = hasRealView;
|
|
51
|
+
this.listenersToRemove = listenersToRemove;
|
|
52
|
+
this.attachedView = attachedView;
|
|
53
|
+
}
|
|
54
|
+
dispose() {
|
|
55
|
+
dispose(this.listenersToRemove);
|
|
56
|
+
this.model.onBeforeDetached(this.attachedView);
|
|
57
|
+
if (this.hasRealView) {
|
|
58
|
+
this.view.dispose();
|
|
59
|
+
}
|
|
60
|
+
this.viewModel.dispose();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
let CodeEditorWidget = class CodeEditorWidget extends Disposable {
|
|
64
|
+
static { CodeEditorWidget_1 = this; }
|
|
65
|
+
static { this.dropIntoEditorDecorationOptions = ModelDecorationOptions.register({
|
|
66
|
+
description: 'workbench-dnd-target',
|
|
67
|
+
className: 'dnd-target'
|
|
68
|
+
}); }
|
|
69
|
+
get isSimpleWidget() {
|
|
70
|
+
return this._configuration.isSimpleWidget;
|
|
71
|
+
}
|
|
72
|
+
get contextKeyService() { return this._contextKeyService; }
|
|
73
|
+
constructor(domElement, _options, codeEditorWidgetOptions, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService, accessibilityService, languageConfigurationService, languageFeaturesService) {
|
|
74
|
+
super();
|
|
75
|
+
this.languageConfigurationService = languageConfigurationService;
|
|
76
|
+
this._deliveryQueue = createEventDeliveryQueue();
|
|
77
|
+
this._contributions = this._register(( new CodeEditorContributions()));
|
|
78
|
+
this._onDidDispose = this._register(( new Emitter()));
|
|
79
|
+
this.onDidDispose = this._onDidDispose.event;
|
|
80
|
+
this._onDidChangeModelContent = this._register(( new Emitter({ deliveryQueue: this._deliveryQueue })));
|
|
81
|
+
this.onDidChangeModelContent = this._onDidChangeModelContent.event;
|
|
82
|
+
this._onDidChangeModelLanguage = this._register(( new Emitter({ deliveryQueue: this._deliveryQueue })));
|
|
83
|
+
this.onDidChangeModelLanguage = this._onDidChangeModelLanguage.event;
|
|
84
|
+
this._onDidChangeModelLanguageConfiguration = this._register(( new Emitter({ deliveryQueue: this._deliveryQueue })));
|
|
85
|
+
this.onDidChangeModelLanguageConfiguration = this._onDidChangeModelLanguageConfiguration.event;
|
|
86
|
+
this._onDidChangeModelOptions = this._register(( new Emitter({ deliveryQueue: this._deliveryQueue })));
|
|
87
|
+
this.onDidChangeModelOptions = this._onDidChangeModelOptions.event;
|
|
88
|
+
this._onDidChangeModelDecorations = this._register(( new Emitter({ deliveryQueue: this._deliveryQueue })));
|
|
89
|
+
this.onDidChangeModelDecorations = this._onDidChangeModelDecorations.event;
|
|
90
|
+
this._onDidChangeModelTokens = this._register(( new Emitter({ deliveryQueue: this._deliveryQueue })));
|
|
91
|
+
this.onDidChangeModelTokens = this._onDidChangeModelTokens.event;
|
|
92
|
+
this._onDidChangeConfiguration = this._register(( new Emitter({ deliveryQueue: this._deliveryQueue })));
|
|
93
|
+
this.onDidChangeConfiguration = this._onDidChangeConfiguration.event;
|
|
94
|
+
this._onDidChangeModel = this._register(( new Emitter({ deliveryQueue: this._deliveryQueue })));
|
|
95
|
+
this.onDidChangeModel = this._onDidChangeModel.event;
|
|
96
|
+
this._onDidChangeCursorPosition = this._register(( new Emitter({ deliveryQueue: this._deliveryQueue })));
|
|
97
|
+
this.onDidChangeCursorPosition = this._onDidChangeCursorPosition.event;
|
|
98
|
+
this._onDidChangeCursorSelection = this._register(( new Emitter({ deliveryQueue: this._deliveryQueue })));
|
|
99
|
+
this.onDidChangeCursorSelection = this._onDidChangeCursorSelection.event;
|
|
100
|
+
this._onDidAttemptReadOnlyEdit = this._register(( new InteractionEmitter(this._contributions, this._deliveryQueue)));
|
|
101
|
+
this.onDidAttemptReadOnlyEdit = this._onDidAttemptReadOnlyEdit.event;
|
|
102
|
+
this._onDidLayoutChange = this._register(( new Emitter({ deliveryQueue: this._deliveryQueue })));
|
|
103
|
+
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
104
|
+
this._editorTextFocus = this._register(( new BooleanEventEmitter({ deliveryQueue: this._deliveryQueue })));
|
|
105
|
+
this.onDidFocusEditorText = this._editorTextFocus.onDidChangeToTrue;
|
|
106
|
+
this.onDidBlurEditorText = this._editorTextFocus.onDidChangeToFalse;
|
|
107
|
+
this._editorWidgetFocus = this._register(( new BooleanEventEmitter({ deliveryQueue: this._deliveryQueue })));
|
|
108
|
+
this.onDidFocusEditorWidget = this._editorWidgetFocus.onDidChangeToTrue;
|
|
109
|
+
this.onDidBlurEditorWidget = this._editorWidgetFocus.onDidChangeToFalse;
|
|
110
|
+
this._onWillType = this._register(( new InteractionEmitter(this._contributions, this._deliveryQueue)));
|
|
111
|
+
this.onWillType = this._onWillType.event;
|
|
112
|
+
this._onDidType = this._register(( new InteractionEmitter(this._contributions, this._deliveryQueue)));
|
|
113
|
+
this.onDidType = this._onDidType.event;
|
|
114
|
+
this._onDidCompositionStart = this._register(( new InteractionEmitter(this._contributions, this._deliveryQueue)));
|
|
115
|
+
this.onDidCompositionStart = this._onDidCompositionStart.event;
|
|
116
|
+
this._onDidCompositionEnd = this._register(( new InteractionEmitter(this._contributions, this._deliveryQueue)));
|
|
117
|
+
this.onDidCompositionEnd = this._onDidCompositionEnd.event;
|
|
118
|
+
this._onDidPaste = this._register(( new InteractionEmitter(this._contributions, this._deliveryQueue)));
|
|
119
|
+
this.onDidPaste = this._onDidPaste.event;
|
|
120
|
+
this._onMouseUp = this._register(( new InteractionEmitter(this._contributions, this._deliveryQueue)));
|
|
121
|
+
this.onMouseUp = this._onMouseUp.event;
|
|
122
|
+
this._onMouseDown = this._register(( new InteractionEmitter(this._contributions, this._deliveryQueue)));
|
|
123
|
+
this.onMouseDown = this._onMouseDown.event;
|
|
124
|
+
this._onMouseDrag = this._register(( new InteractionEmitter(this._contributions, this._deliveryQueue)));
|
|
125
|
+
this.onMouseDrag = this._onMouseDrag.event;
|
|
126
|
+
this._onMouseDrop = this._register(( new InteractionEmitter(this._contributions, this._deliveryQueue)));
|
|
127
|
+
this.onMouseDrop = this._onMouseDrop.event;
|
|
128
|
+
this._onMouseDropCanceled = this._register(( new InteractionEmitter(this._contributions, this._deliveryQueue)));
|
|
129
|
+
this.onMouseDropCanceled = this._onMouseDropCanceled.event;
|
|
130
|
+
this._onDropIntoEditor = this._register(( new InteractionEmitter(this._contributions, this._deliveryQueue)));
|
|
131
|
+
this.onDropIntoEditor = this._onDropIntoEditor.event;
|
|
132
|
+
this._onContextMenu = this._register(( new InteractionEmitter(this._contributions, this._deliveryQueue)));
|
|
133
|
+
this.onContextMenu = this._onContextMenu.event;
|
|
134
|
+
this._onMouseMove = this._register(( new InteractionEmitter(this._contributions, this._deliveryQueue)));
|
|
135
|
+
this.onMouseMove = this._onMouseMove.event;
|
|
136
|
+
this._onMouseLeave = this._register(( new InteractionEmitter(this._contributions, this._deliveryQueue)));
|
|
137
|
+
this.onMouseLeave = this._onMouseLeave.event;
|
|
138
|
+
this._onMouseWheel = this._register(( new InteractionEmitter(this._contributions, this._deliveryQueue)));
|
|
139
|
+
this.onMouseWheel = this._onMouseWheel.event;
|
|
140
|
+
this._onKeyUp = this._register(( new InteractionEmitter(this._contributions, this._deliveryQueue)));
|
|
141
|
+
this.onKeyUp = this._onKeyUp.event;
|
|
142
|
+
this._onKeyDown = this._register(( new InteractionEmitter(this._contributions, this._deliveryQueue)));
|
|
143
|
+
this.onKeyDown = this._onKeyDown.event;
|
|
144
|
+
this._onDidContentSizeChange = this._register(( new Emitter({ deliveryQueue: this._deliveryQueue })));
|
|
145
|
+
this.onDidContentSizeChange = this._onDidContentSizeChange.event;
|
|
146
|
+
this._onDidScrollChange = this._register(( new Emitter({ deliveryQueue: this._deliveryQueue })));
|
|
147
|
+
this.onDidScrollChange = this._onDidScrollChange.event;
|
|
148
|
+
this._onDidChangeViewZones = this._register(( new Emitter({ deliveryQueue: this._deliveryQueue })));
|
|
149
|
+
this.onDidChangeViewZones = this._onDidChangeViewZones.event;
|
|
150
|
+
this._onDidChangeHiddenAreas = this._register(( new Emitter({ deliveryQueue: this._deliveryQueue })));
|
|
151
|
+
this.onDidChangeHiddenAreas = this._onDidChangeHiddenAreas.event;
|
|
152
|
+
this._actions = ( new Map());
|
|
153
|
+
this._bannerDomNode = null;
|
|
154
|
+
this._dropIntoEditorDecorations = this.createDecorationsCollection();
|
|
155
|
+
codeEditorService.willCreateCodeEditor();
|
|
156
|
+
const options = { ..._options };
|
|
157
|
+
this._domElement = domElement;
|
|
158
|
+
this._overflowWidgetsDomNode = options.overflowWidgetsDomNode;
|
|
159
|
+
delete options.overflowWidgetsDomNode;
|
|
160
|
+
this._id = (++EDITOR_ID);
|
|
161
|
+
this._decorationTypeKeysToIds = {};
|
|
162
|
+
this._decorationTypeSubtypes = {};
|
|
163
|
+
this._telemetryData = codeEditorWidgetOptions.telemetryData;
|
|
164
|
+
this._configuration = this._register(this._createConfiguration(codeEditorWidgetOptions.isSimpleWidget || false, options, accessibilityService));
|
|
165
|
+
this._register(this._configuration.onDidChange((e) => {
|
|
166
|
+
this._onDidChangeConfiguration.fire(e);
|
|
167
|
+
const options = this._configuration.options;
|
|
168
|
+
if (e.hasChanged(143 )) {
|
|
169
|
+
const layoutInfo = options.get(143 );
|
|
170
|
+
this._onDidLayoutChange.fire(layoutInfo);
|
|
171
|
+
}
|
|
172
|
+
}));
|
|
173
|
+
this._contextKeyService = this._register(contextKeyService.createScoped(this._domElement));
|
|
174
|
+
this._notificationService = notificationService;
|
|
175
|
+
this._codeEditorService = codeEditorService;
|
|
176
|
+
this._commandService = commandService;
|
|
177
|
+
this._themeService = themeService;
|
|
178
|
+
this._register(( new EditorContextKeysManager(this, this._contextKeyService)));
|
|
179
|
+
this._register(( new EditorModeContext(this, this._contextKeyService, languageFeaturesService)));
|
|
180
|
+
this._instantiationService = instantiationService.createChild(( new ServiceCollection([IContextKeyService, this._contextKeyService])));
|
|
181
|
+
this._modelData = null;
|
|
182
|
+
this._focusTracker = ( new CodeEditorWidgetFocusTracker(domElement));
|
|
183
|
+
this._register(this._focusTracker.onChange(() => {
|
|
184
|
+
this._editorWidgetFocus.setValue(this._focusTracker.hasFocus());
|
|
185
|
+
}));
|
|
186
|
+
this._contentWidgets = {};
|
|
187
|
+
this._overlayWidgets = {};
|
|
188
|
+
this._glyphMarginWidgets = {};
|
|
189
|
+
let contributions;
|
|
190
|
+
if (Array.isArray(codeEditorWidgetOptions.contributions)) {
|
|
191
|
+
contributions = codeEditorWidgetOptions.contributions;
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
contributions = EditorExtensionsRegistry.getEditorContributions();
|
|
195
|
+
}
|
|
196
|
+
this._contributions.initialize(this, contributions, this._instantiationService);
|
|
197
|
+
for (const action of EditorExtensionsRegistry.getEditorActions()) {
|
|
198
|
+
if (( this._actions.has(action.id))) {
|
|
199
|
+
onUnexpectedError(( new Error(`Cannot have two actions with the same id ${action.id}`)));
|
|
200
|
+
continue;
|
|
201
|
+
}
|
|
202
|
+
const internalAction = ( new InternalEditorAction(
|
|
203
|
+
action.id,
|
|
204
|
+
action.label,
|
|
205
|
+
action.alias,
|
|
206
|
+
action.metadata,
|
|
207
|
+
action.precondition ?? undefined,
|
|
208
|
+
() => {
|
|
209
|
+
return this._instantiationService.invokeFunction((accessor) => {
|
|
210
|
+
return Promise.resolve(action.runEditorCommand(accessor, this, null));
|
|
211
|
+
});
|
|
212
|
+
},
|
|
213
|
+
this._contextKeyService
|
|
214
|
+
));
|
|
215
|
+
this._actions.set(internalAction.id, internalAction);
|
|
216
|
+
}
|
|
217
|
+
const isDropIntoEnabled = () => {
|
|
218
|
+
return !this._configuration.options.get(90 )
|
|
219
|
+
&& this._configuration.options.get(36 ).enabled;
|
|
220
|
+
};
|
|
221
|
+
this._register(new DragAndDropObserver(this._domElement, {
|
|
222
|
+
onDragOver: e => {
|
|
223
|
+
if (!isDropIntoEnabled()) {
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
const target = this.getTargetAtClientPoint(e.clientX, e.clientY);
|
|
227
|
+
if (target?.position) {
|
|
228
|
+
this.showDropIndicatorAt(target.position);
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
onDrop: async (e) => {
|
|
232
|
+
if (!isDropIntoEnabled()) {
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
this.removeDropIndicator();
|
|
236
|
+
if (!e.dataTransfer) {
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
const target = this.getTargetAtClientPoint(e.clientX, e.clientY);
|
|
240
|
+
if (target?.position) {
|
|
241
|
+
this._onDropIntoEditor.fire({ position: target.position, event: e });
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
onDragLeave: () => {
|
|
245
|
+
this.removeDropIndicator();
|
|
246
|
+
},
|
|
247
|
+
onDragEnd: () => {
|
|
248
|
+
this.removeDropIndicator();
|
|
249
|
+
},
|
|
250
|
+
}));
|
|
251
|
+
this._codeEditorService.addCodeEditor(this);
|
|
252
|
+
}
|
|
253
|
+
writeScreenReaderContent(reason) {
|
|
254
|
+
this._modelData?.view.writeScreenReaderContent(reason);
|
|
255
|
+
}
|
|
256
|
+
_createConfiguration(isSimpleWidget, options, accessibilityService) {
|
|
257
|
+
return ( new EditorConfiguration(isSimpleWidget, options, this._domElement, accessibilityService));
|
|
258
|
+
}
|
|
259
|
+
getId() {
|
|
260
|
+
return this.getEditorType() + ':' + this._id;
|
|
261
|
+
}
|
|
262
|
+
getEditorType() {
|
|
263
|
+
return EditorType.ICodeEditor;
|
|
264
|
+
}
|
|
265
|
+
dispose() {
|
|
266
|
+
this._codeEditorService.removeCodeEditor(this);
|
|
267
|
+
this._focusTracker.dispose();
|
|
268
|
+
this._actions.clear();
|
|
269
|
+
this._contentWidgets = {};
|
|
270
|
+
this._overlayWidgets = {};
|
|
271
|
+
this._removeDecorationTypes();
|
|
272
|
+
this._postDetachModelCleanup(this._detachModel());
|
|
273
|
+
this._onDidDispose.fire();
|
|
274
|
+
super.dispose();
|
|
275
|
+
}
|
|
276
|
+
invokeWithinContext(fn) {
|
|
277
|
+
return this._instantiationService.invokeFunction(fn);
|
|
278
|
+
}
|
|
279
|
+
updateOptions(newOptions) {
|
|
280
|
+
this._configuration.updateOptions(newOptions || {});
|
|
281
|
+
}
|
|
282
|
+
getOptions() {
|
|
283
|
+
return this._configuration.options;
|
|
284
|
+
}
|
|
285
|
+
getOption(id) {
|
|
286
|
+
return this._configuration.options.get(id);
|
|
287
|
+
}
|
|
288
|
+
getRawOptions() {
|
|
289
|
+
return this._configuration.getRawOptions();
|
|
290
|
+
}
|
|
291
|
+
getOverflowWidgetsDomNode() {
|
|
292
|
+
return this._overflowWidgetsDomNode;
|
|
293
|
+
}
|
|
294
|
+
getConfiguredWordAtPosition(position) {
|
|
295
|
+
if (!this._modelData) {
|
|
296
|
+
return null;
|
|
297
|
+
}
|
|
298
|
+
return WordOperations.getWordAtPosition(this._modelData.model, this._configuration.options.get(129 ), position);
|
|
299
|
+
}
|
|
300
|
+
getValue(options = null) {
|
|
301
|
+
if (!this._modelData) {
|
|
302
|
+
return '';
|
|
303
|
+
}
|
|
304
|
+
const preserveBOM = (options && options.preserveBOM) ? true : false;
|
|
305
|
+
let eolPreference = 0 ;
|
|
306
|
+
if (options && options.lineEnding && options.lineEnding === '\n') {
|
|
307
|
+
eolPreference = 1 ;
|
|
308
|
+
}
|
|
309
|
+
else if (options && options.lineEnding && options.lineEnding === '\r\n') {
|
|
310
|
+
eolPreference = 2 ;
|
|
311
|
+
}
|
|
312
|
+
return this._modelData.model.getValue(eolPreference, preserveBOM);
|
|
313
|
+
}
|
|
314
|
+
setValue(newValue) {
|
|
315
|
+
if (!this._modelData) {
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
this._modelData.model.setValue(newValue);
|
|
319
|
+
}
|
|
320
|
+
getModel() {
|
|
321
|
+
if (!this._modelData) {
|
|
322
|
+
return null;
|
|
323
|
+
}
|
|
324
|
+
return this._modelData.model;
|
|
325
|
+
}
|
|
326
|
+
setModel(_model = null) {
|
|
327
|
+
const model = _model;
|
|
328
|
+
if (this._modelData === null && model === null) {
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
if (this._modelData && this._modelData.model === model) {
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
const hasTextFocus = this.hasTextFocus();
|
|
335
|
+
const detachedModel = this._detachModel();
|
|
336
|
+
this._attachModel(model);
|
|
337
|
+
if (hasTextFocus && this.hasModel()) {
|
|
338
|
+
this.focus();
|
|
339
|
+
}
|
|
340
|
+
const e = {
|
|
341
|
+
oldModelUrl: detachedModel ? detachedModel.uri : null,
|
|
342
|
+
newModelUrl: model ? model.uri : null
|
|
343
|
+
};
|
|
344
|
+
this._removeDecorationTypes();
|
|
345
|
+
this._onDidChangeModel.fire(e);
|
|
346
|
+
this._postDetachModelCleanup(detachedModel);
|
|
347
|
+
this._contributions.onAfterModelAttached();
|
|
348
|
+
}
|
|
349
|
+
_removeDecorationTypes() {
|
|
350
|
+
this._decorationTypeKeysToIds = {};
|
|
351
|
+
if (this._decorationTypeSubtypes) {
|
|
352
|
+
for (const decorationType in this._decorationTypeSubtypes) {
|
|
353
|
+
const subTypes = this._decorationTypeSubtypes[decorationType];
|
|
354
|
+
for (const subType in subTypes) {
|
|
355
|
+
this._removeDecorationType(decorationType + '-' + subType);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
this._decorationTypeSubtypes = {};
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
getVisibleRanges() {
|
|
362
|
+
if (!this._modelData) {
|
|
363
|
+
return [];
|
|
364
|
+
}
|
|
365
|
+
return this._modelData.viewModel.getVisibleRanges();
|
|
366
|
+
}
|
|
367
|
+
getVisibleRangesPlusViewportAboveBelow() {
|
|
368
|
+
if (!this._modelData) {
|
|
369
|
+
return [];
|
|
370
|
+
}
|
|
371
|
+
return this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow();
|
|
372
|
+
}
|
|
373
|
+
getWhitespaces() {
|
|
374
|
+
if (!this._modelData) {
|
|
375
|
+
return [];
|
|
376
|
+
}
|
|
377
|
+
return this._modelData.viewModel.viewLayout.getWhitespaces();
|
|
378
|
+
}
|
|
379
|
+
static _getVerticalOffsetAfterPosition(modelData, modelLineNumber, modelColumn, includeViewZones) {
|
|
380
|
+
const modelPosition = modelData.model.validatePosition({
|
|
381
|
+
lineNumber: modelLineNumber,
|
|
382
|
+
column: modelColumn
|
|
383
|
+
});
|
|
384
|
+
const viewPosition = modelData.viewModel.coordinatesConverter.convertModelPositionToViewPosition(modelPosition);
|
|
385
|
+
return modelData.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(viewPosition.lineNumber, includeViewZones);
|
|
386
|
+
}
|
|
387
|
+
getTopForLineNumber(lineNumber, includeViewZones = false) {
|
|
388
|
+
if (!this._modelData) {
|
|
389
|
+
return -1;
|
|
390
|
+
}
|
|
391
|
+
return CodeEditorWidget_1._getVerticalOffsetForPosition(this._modelData, lineNumber, 1, includeViewZones);
|
|
392
|
+
}
|
|
393
|
+
getTopForPosition(lineNumber, column) {
|
|
394
|
+
if (!this._modelData) {
|
|
395
|
+
return -1;
|
|
396
|
+
}
|
|
397
|
+
return CodeEditorWidget_1._getVerticalOffsetForPosition(this._modelData, lineNumber, column, false);
|
|
398
|
+
}
|
|
399
|
+
static _getVerticalOffsetForPosition(modelData, modelLineNumber, modelColumn, includeViewZones = false) {
|
|
400
|
+
const modelPosition = modelData.model.validatePosition({
|
|
401
|
+
lineNumber: modelLineNumber,
|
|
402
|
+
column: modelColumn
|
|
403
|
+
});
|
|
404
|
+
const viewPosition = modelData.viewModel.coordinatesConverter.convertModelPositionToViewPosition(modelPosition);
|
|
405
|
+
return modelData.viewModel.viewLayout.getVerticalOffsetForLineNumber(viewPosition.lineNumber, includeViewZones);
|
|
406
|
+
}
|
|
407
|
+
getBottomForLineNumber(lineNumber, includeViewZones = false) {
|
|
408
|
+
if (!this._modelData) {
|
|
409
|
+
return -1;
|
|
410
|
+
}
|
|
411
|
+
return CodeEditorWidget_1._getVerticalOffsetAfterPosition(this._modelData, lineNumber, 1, includeViewZones);
|
|
412
|
+
}
|
|
413
|
+
setHiddenAreas(ranges, source) {
|
|
414
|
+
this._modelData?.viewModel.setHiddenAreas(( ranges.map(r => Range.lift(r))), source);
|
|
415
|
+
}
|
|
416
|
+
getVisibleColumnFromPosition(rawPosition) {
|
|
417
|
+
if (!this._modelData) {
|
|
418
|
+
return rawPosition.column;
|
|
419
|
+
}
|
|
420
|
+
const position = this._modelData.model.validatePosition(rawPosition);
|
|
421
|
+
const tabSize = this._modelData.model.getOptions().tabSize;
|
|
422
|
+
return CursorColumns.visibleColumnFromColumn(this._modelData.model.getLineContent(position.lineNumber), position.column, tabSize) + 1;
|
|
423
|
+
}
|
|
424
|
+
getStatusbarColumn(rawPosition) {
|
|
425
|
+
if (!this._modelData) {
|
|
426
|
+
return rawPosition.column;
|
|
427
|
+
}
|
|
428
|
+
const position = this._modelData.model.validatePosition(rawPosition);
|
|
429
|
+
const tabSize = this._modelData.model.getOptions().tabSize;
|
|
430
|
+
return CursorColumns.toStatusbarColumn(this._modelData.model.getLineContent(position.lineNumber), position.column, tabSize);
|
|
431
|
+
}
|
|
432
|
+
getPosition() {
|
|
433
|
+
if (!this._modelData) {
|
|
434
|
+
return null;
|
|
435
|
+
}
|
|
436
|
+
return this._modelData.viewModel.getPosition();
|
|
437
|
+
}
|
|
438
|
+
setPosition(position, source = 'api') {
|
|
439
|
+
if (!this._modelData) {
|
|
440
|
+
return;
|
|
441
|
+
}
|
|
442
|
+
if (!Position.isIPosition(position)) {
|
|
443
|
+
throw new Error('Invalid arguments');
|
|
444
|
+
}
|
|
445
|
+
this._modelData.viewModel.setSelections(source, [{
|
|
446
|
+
selectionStartLineNumber: position.lineNumber,
|
|
447
|
+
selectionStartColumn: position.column,
|
|
448
|
+
positionLineNumber: position.lineNumber,
|
|
449
|
+
positionColumn: position.column
|
|
450
|
+
}]);
|
|
451
|
+
}
|
|
452
|
+
_sendRevealRange(modelRange, verticalType, revealHorizontal, scrollType) {
|
|
453
|
+
if (!this._modelData) {
|
|
454
|
+
return;
|
|
455
|
+
}
|
|
456
|
+
if (!Range.isIRange(modelRange)) {
|
|
457
|
+
throw new Error('Invalid arguments');
|
|
458
|
+
}
|
|
459
|
+
const validatedModelRange = this._modelData.model.validateRange(modelRange);
|
|
460
|
+
const viewRange = this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(validatedModelRange);
|
|
461
|
+
this._modelData.viewModel.revealRange('api', revealHorizontal, viewRange, verticalType, scrollType);
|
|
462
|
+
}
|
|
463
|
+
revealLine(lineNumber, scrollType = 0 ) {
|
|
464
|
+
this._revealLine(lineNumber, 0 , scrollType);
|
|
465
|
+
}
|
|
466
|
+
revealLineInCenter(lineNumber, scrollType = 0 ) {
|
|
467
|
+
this._revealLine(lineNumber, 1 , scrollType);
|
|
468
|
+
}
|
|
469
|
+
revealLineInCenterIfOutsideViewport(lineNumber, scrollType = 0 ) {
|
|
470
|
+
this._revealLine(lineNumber, 2 , scrollType);
|
|
471
|
+
}
|
|
472
|
+
revealLineNearTop(lineNumber, scrollType = 0 ) {
|
|
473
|
+
this._revealLine(lineNumber, 5 , scrollType);
|
|
474
|
+
}
|
|
475
|
+
_revealLine(lineNumber, revealType, scrollType) {
|
|
476
|
+
if (typeof lineNumber !== 'number') {
|
|
477
|
+
throw new Error('Invalid arguments');
|
|
478
|
+
}
|
|
479
|
+
this._sendRevealRange(( new Range(lineNumber, 1, lineNumber, 1)), revealType, false, scrollType);
|
|
480
|
+
}
|
|
481
|
+
revealPosition(position, scrollType = 0 ) {
|
|
482
|
+
this._revealPosition(position, 0 , true, scrollType);
|
|
483
|
+
}
|
|
484
|
+
revealPositionInCenter(position, scrollType = 0 ) {
|
|
485
|
+
this._revealPosition(position, 1 , true, scrollType);
|
|
486
|
+
}
|
|
487
|
+
revealPositionInCenterIfOutsideViewport(position, scrollType = 0 ) {
|
|
488
|
+
this._revealPosition(position, 2 , true, scrollType);
|
|
489
|
+
}
|
|
490
|
+
revealPositionNearTop(position, scrollType = 0 ) {
|
|
491
|
+
this._revealPosition(position, 5 , true, scrollType);
|
|
492
|
+
}
|
|
493
|
+
_revealPosition(position, verticalType, revealHorizontal, scrollType) {
|
|
494
|
+
if (!Position.isIPosition(position)) {
|
|
495
|
+
throw new Error('Invalid arguments');
|
|
496
|
+
}
|
|
497
|
+
this._sendRevealRange(( new Range(position.lineNumber, position.column, position.lineNumber, position.column)), verticalType, revealHorizontal, scrollType);
|
|
498
|
+
}
|
|
499
|
+
getSelection() {
|
|
500
|
+
if (!this._modelData) {
|
|
501
|
+
return null;
|
|
502
|
+
}
|
|
503
|
+
return this._modelData.viewModel.getSelection();
|
|
504
|
+
}
|
|
505
|
+
getSelections() {
|
|
506
|
+
if (!this._modelData) {
|
|
507
|
+
return null;
|
|
508
|
+
}
|
|
509
|
+
return this._modelData.viewModel.getSelections();
|
|
510
|
+
}
|
|
511
|
+
setSelection(something, source = 'api') {
|
|
512
|
+
const isSelection = Selection.isISelection(something);
|
|
513
|
+
const isRange = Range.isIRange(something);
|
|
514
|
+
if (!isSelection && !isRange) {
|
|
515
|
+
throw new Error('Invalid arguments');
|
|
516
|
+
}
|
|
517
|
+
if (isSelection) {
|
|
518
|
+
this._setSelectionImpl(something, source);
|
|
519
|
+
}
|
|
520
|
+
else if (isRange) {
|
|
521
|
+
const selection = {
|
|
522
|
+
selectionStartLineNumber: something.startLineNumber,
|
|
523
|
+
selectionStartColumn: something.startColumn,
|
|
524
|
+
positionLineNumber: something.endLineNumber,
|
|
525
|
+
positionColumn: something.endColumn
|
|
526
|
+
};
|
|
527
|
+
this._setSelectionImpl(selection, source);
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
_setSelectionImpl(sel, source) {
|
|
531
|
+
if (!this._modelData) {
|
|
532
|
+
return;
|
|
533
|
+
}
|
|
534
|
+
const selection = ( new Selection(
|
|
535
|
+
sel.selectionStartLineNumber,
|
|
536
|
+
sel.selectionStartColumn,
|
|
537
|
+
sel.positionLineNumber,
|
|
538
|
+
sel.positionColumn
|
|
539
|
+
));
|
|
540
|
+
this._modelData.viewModel.setSelections(source, [selection]);
|
|
541
|
+
}
|
|
542
|
+
revealLines(startLineNumber, endLineNumber, scrollType = 0 ) {
|
|
543
|
+
this._revealLines(startLineNumber, endLineNumber, 0 , scrollType);
|
|
544
|
+
}
|
|
545
|
+
revealLinesInCenter(startLineNumber, endLineNumber, scrollType = 0 ) {
|
|
546
|
+
this._revealLines(startLineNumber, endLineNumber, 1 , scrollType);
|
|
547
|
+
}
|
|
548
|
+
revealLinesInCenterIfOutsideViewport(startLineNumber, endLineNumber, scrollType = 0 ) {
|
|
549
|
+
this._revealLines(startLineNumber, endLineNumber, 2 , scrollType);
|
|
550
|
+
}
|
|
551
|
+
revealLinesNearTop(startLineNumber, endLineNumber, scrollType = 0 ) {
|
|
552
|
+
this._revealLines(startLineNumber, endLineNumber, 5 , scrollType);
|
|
553
|
+
}
|
|
554
|
+
_revealLines(startLineNumber, endLineNumber, verticalType, scrollType) {
|
|
555
|
+
if (typeof startLineNumber !== 'number' || typeof endLineNumber !== 'number') {
|
|
556
|
+
throw new Error('Invalid arguments');
|
|
557
|
+
}
|
|
558
|
+
this._sendRevealRange(( new Range(startLineNumber, 1, endLineNumber, 1)), verticalType, false, scrollType);
|
|
559
|
+
}
|
|
560
|
+
revealRange(range, scrollType = 0 , revealVerticalInCenter = false, revealHorizontal = true) {
|
|
561
|
+
this._revealRange(range, revealVerticalInCenter ? 1 : 0 , revealHorizontal, scrollType);
|
|
562
|
+
}
|
|
563
|
+
revealRangeInCenter(range, scrollType = 0 ) {
|
|
564
|
+
this._revealRange(range, 1 , true, scrollType);
|
|
565
|
+
}
|
|
566
|
+
revealRangeInCenterIfOutsideViewport(range, scrollType = 0 ) {
|
|
567
|
+
this._revealRange(range, 2 , true, scrollType);
|
|
568
|
+
}
|
|
569
|
+
revealRangeNearTop(range, scrollType = 0 ) {
|
|
570
|
+
this._revealRange(range, 5 , true, scrollType);
|
|
571
|
+
}
|
|
572
|
+
revealRangeNearTopIfOutsideViewport(range, scrollType = 0 ) {
|
|
573
|
+
this._revealRange(range, 6 , true, scrollType);
|
|
574
|
+
}
|
|
575
|
+
revealRangeAtTop(range, scrollType = 0 ) {
|
|
576
|
+
this._revealRange(range, 3 , true, scrollType);
|
|
577
|
+
}
|
|
578
|
+
_revealRange(range, verticalType, revealHorizontal, scrollType) {
|
|
579
|
+
if (!Range.isIRange(range)) {
|
|
580
|
+
throw new Error('Invalid arguments');
|
|
581
|
+
}
|
|
582
|
+
this._sendRevealRange(Range.lift(range), verticalType, revealHorizontal, scrollType);
|
|
583
|
+
}
|
|
584
|
+
setSelections(ranges, source = 'api', reason = 0 ) {
|
|
585
|
+
if (!this._modelData) {
|
|
586
|
+
return;
|
|
587
|
+
}
|
|
588
|
+
if (!ranges || ranges.length === 0) {
|
|
589
|
+
throw new Error('Invalid arguments');
|
|
590
|
+
}
|
|
591
|
+
for (let i = 0, len = ranges.length; i < len; i++) {
|
|
592
|
+
if (!Selection.isISelection(ranges[i])) {
|
|
593
|
+
throw new Error('Invalid arguments');
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
this._modelData.viewModel.setSelections(source, ranges, reason);
|
|
597
|
+
}
|
|
598
|
+
getContentWidth() {
|
|
599
|
+
if (!this._modelData) {
|
|
600
|
+
return -1;
|
|
601
|
+
}
|
|
602
|
+
return this._modelData.viewModel.viewLayout.getContentWidth();
|
|
603
|
+
}
|
|
604
|
+
getScrollWidth() {
|
|
605
|
+
if (!this._modelData) {
|
|
606
|
+
return -1;
|
|
607
|
+
}
|
|
608
|
+
return this._modelData.viewModel.viewLayout.getScrollWidth();
|
|
609
|
+
}
|
|
610
|
+
getScrollLeft() {
|
|
611
|
+
if (!this._modelData) {
|
|
612
|
+
return -1;
|
|
613
|
+
}
|
|
614
|
+
return this._modelData.viewModel.viewLayout.getCurrentScrollLeft();
|
|
615
|
+
}
|
|
616
|
+
getContentHeight() {
|
|
617
|
+
if (!this._modelData) {
|
|
618
|
+
return -1;
|
|
619
|
+
}
|
|
620
|
+
return this._modelData.viewModel.viewLayout.getContentHeight();
|
|
621
|
+
}
|
|
622
|
+
getScrollHeight() {
|
|
623
|
+
if (!this._modelData) {
|
|
624
|
+
return -1;
|
|
625
|
+
}
|
|
626
|
+
return this._modelData.viewModel.viewLayout.getScrollHeight();
|
|
627
|
+
}
|
|
628
|
+
getScrollTop() {
|
|
629
|
+
if (!this._modelData) {
|
|
630
|
+
return -1;
|
|
631
|
+
}
|
|
632
|
+
return this._modelData.viewModel.viewLayout.getCurrentScrollTop();
|
|
633
|
+
}
|
|
634
|
+
setScrollLeft(newScrollLeft, scrollType = 1 ) {
|
|
635
|
+
if (!this._modelData) {
|
|
636
|
+
return;
|
|
637
|
+
}
|
|
638
|
+
if (typeof newScrollLeft !== 'number') {
|
|
639
|
+
throw new Error('Invalid arguments');
|
|
640
|
+
}
|
|
641
|
+
this._modelData.viewModel.viewLayout.setScrollPosition({
|
|
642
|
+
scrollLeft: newScrollLeft
|
|
643
|
+
}, scrollType);
|
|
644
|
+
}
|
|
645
|
+
setScrollTop(newScrollTop, scrollType = 1 ) {
|
|
646
|
+
if (!this._modelData) {
|
|
647
|
+
return;
|
|
648
|
+
}
|
|
649
|
+
if (typeof newScrollTop !== 'number') {
|
|
650
|
+
throw new Error('Invalid arguments');
|
|
651
|
+
}
|
|
652
|
+
this._modelData.viewModel.viewLayout.setScrollPosition({
|
|
653
|
+
scrollTop: newScrollTop
|
|
654
|
+
}, scrollType);
|
|
655
|
+
}
|
|
656
|
+
setScrollPosition(position, scrollType = 1 ) {
|
|
657
|
+
if (!this._modelData) {
|
|
658
|
+
return;
|
|
659
|
+
}
|
|
660
|
+
this._modelData.viewModel.viewLayout.setScrollPosition(position, scrollType);
|
|
661
|
+
}
|
|
662
|
+
hasPendingScrollAnimation() {
|
|
663
|
+
if (!this._modelData) {
|
|
664
|
+
return false;
|
|
665
|
+
}
|
|
666
|
+
return this._modelData.viewModel.viewLayout.hasPendingScrollAnimation();
|
|
667
|
+
}
|
|
668
|
+
saveViewState() {
|
|
669
|
+
if (!this._modelData) {
|
|
670
|
+
return null;
|
|
671
|
+
}
|
|
672
|
+
const contributionsState = this._contributions.saveViewState();
|
|
673
|
+
const cursorState = this._modelData.viewModel.saveCursorState();
|
|
674
|
+
const viewState = this._modelData.viewModel.saveState();
|
|
675
|
+
return {
|
|
676
|
+
cursorState: cursorState,
|
|
677
|
+
viewState: viewState,
|
|
678
|
+
contributionsState: contributionsState
|
|
679
|
+
};
|
|
680
|
+
}
|
|
681
|
+
restoreViewState(s) {
|
|
682
|
+
if (!this._modelData || !this._modelData.hasRealView) {
|
|
683
|
+
return;
|
|
684
|
+
}
|
|
685
|
+
const codeEditorState = s;
|
|
686
|
+
if (codeEditorState && codeEditorState.cursorState && codeEditorState.viewState) {
|
|
687
|
+
const cursorState = codeEditorState.cursorState;
|
|
688
|
+
if (Array.isArray(cursorState)) {
|
|
689
|
+
if (cursorState.length > 0) {
|
|
690
|
+
this._modelData.viewModel.restoreCursorState(cursorState);
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
else {
|
|
694
|
+
this._modelData.viewModel.restoreCursorState([cursorState]);
|
|
695
|
+
}
|
|
696
|
+
this._contributions.restoreViewState(codeEditorState.contributionsState || {});
|
|
697
|
+
const reducedState = this._modelData.viewModel.reduceRestoreState(codeEditorState.viewState);
|
|
698
|
+
this._modelData.view.restoreState(reducedState);
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
handleInitialized() {
|
|
702
|
+
this._getViewModel()?.visibleLinesStabilized();
|
|
703
|
+
}
|
|
704
|
+
onVisible() {
|
|
705
|
+
this._modelData?.view.refreshFocusState();
|
|
706
|
+
}
|
|
707
|
+
onHide() {
|
|
708
|
+
this._modelData?.view.refreshFocusState();
|
|
709
|
+
this._focusTracker.refreshState();
|
|
710
|
+
}
|
|
711
|
+
getContribution(id) {
|
|
712
|
+
return this._contributions.get(id);
|
|
713
|
+
}
|
|
714
|
+
getActions() {
|
|
715
|
+
return Array.from(( this._actions.values()));
|
|
716
|
+
}
|
|
717
|
+
getSupportedActions() {
|
|
718
|
+
let result = this.getActions();
|
|
719
|
+
result = result.filter(action => action.isSupported());
|
|
720
|
+
return result;
|
|
721
|
+
}
|
|
722
|
+
getAction(id) {
|
|
723
|
+
return this._actions.get(id) || null;
|
|
724
|
+
}
|
|
725
|
+
trigger(source, handlerId, payload) {
|
|
726
|
+
payload = payload || {};
|
|
727
|
+
switch (handlerId) {
|
|
728
|
+
case "compositionStart" :
|
|
729
|
+
this._startComposition();
|
|
730
|
+
return;
|
|
731
|
+
case "compositionEnd" :
|
|
732
|
+
this._endComposition(source);
|
|
733
|
+
return;
|
|
734
|
+
case "type" : {
|
|
735
|
+
const args = payload;
|
|
736
|
+
this._type(source, args.text || '');
|
|
737
|
+
return;
|
|
738
|
+
}
|
|
739
|
+
case "replacePreviousChar" : {
|
|
740
|
+
const args = payload;
|
|
741
|
+
this._compositionType(source, args.text || '', args.replaceCharCnt || 0, 0, 0);
|
|
742
|
+
return;
|
|
743
|
+
}
|
|
744
|
+
case "compositionType" : {
|
|
745
|
+
const args = payload;
|
|
746
|
+
this._compositionType(source, args.text || '', args.replacePrevCharCnt || 0, args.replaceNextCharCnt || 0, args.positionDelta || 0);
|
|
747
|
+
return;
|
|
748
|
+
}
|
|
749
|
+
case "paste" : {
|
|
750
|
+
const args = payload;
|
|
751
|
+
this._paste(source, args.text || '', args.pasteOnNewLine || false, args.multicursorText || null, args.mode || null);
|
|
752
|
+
return;
|
|
753
|
+
}
|
|
754
|
+
case "cut" :
|
|
755
|
+
this._cut(source);
|
|
756
|
+
return;
|
|
757
|
+
}
|
|
758
|
+
const action = this.getAction(handlerId);
|
|
759
|
+
if (action) {
|
|
760
|
+
Promise.resolve(action.run(payload)).then(undefined, onUnexpectedError);
|
|
761
|
+
return;
|
|
762
|
+
}
|
|
763
|
+
if (!this._modelData) {
|
|
764
|
+
return;
|
|
765
|
+
}
|
|
766
|
+
if (this._triggerEditorCommand(source, handlerId, payload)) {
|
|
767
|
+
return;
|
|
768
|
+
}
|
|
769
|
+
this._triggerCommand(handlerId, payload);
|
|
770
|
+
}
|
|
771
|
+
_triggerCommand(handlerId, payload) {
|
|
772
|
+
this._commandService.executeCommand(handlerId, payload);
|
|
773
|
+
}
|
|
774
|
+
_startComposition() {
|
|
775
|
+
if (!this._modelData) {
|
|
776
|
+
return;
|
|
777
|
+
}
|
|
778
|
+
this._modelData.viewModel.startComposition();
|
|
779
|
+
this._onDidCompositionStart.fire();
|
|
780
|
+
}
|
|
781
|
+
_endComposition(source) {
|
|
782
|
+
if (!this._modelData) {
|
|
783
|
+
return;
|
|
784
|
+
}
|
|
785
|
+
this._modelData.viewModel.endComposition(source);
|
|
786
|
+
this._onDidCompositionEnd.fire();
|
|
787
|
+
}
|
|
788
|
+
_type(source, text) {
|
|
789
|
+
if (!this._modelData || text.length === 0) {
|
|
790
|
+
return;
|
|
791
|
+
}
|
|
792
|
+
if (source === 'keyboard') {
|
|
793
|
+
this._onWillType.fire(text);
|
|
794
|
+
}
|
|
795
|
+
this._modelData.viewModel.type(text, source);
|
|
796
|
+
if (source === 'keyboard') {
|
|
797
|
+
this._onDidType.fire(text);
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
_compositionType(source, text, replacePrevCharCnt, replaceNextCharCnt, positionDelta) {
|
|
801
|
+
if (!this._modelData) {
|
|
802
|
+
return;
|
|
803
|
+
}
|
|
804
|
+
this._modelData.viewModel.compositionType(text, replacePrevCharCnt, replaceNextCharCnt, positionDelta, source);
|
|
805
|
+
}
|
|
806
|
+
_paste(source, text, pasteOnNewLine, multicursorText, mode) {
|
|
807
|
+
if (!this._modelData || text.length === 0) {
|
|
808
|
+
return;
|
|
809
|
+
}
|
|
810
|
+
const viewModel = this._modelData.viewModel;
|
|
811
|
+
const startPosition = viewModel.getSelection().getStartPosition();
|
|
812
|
+
viewModel.paste(text, pasteOnNewLine, multicursorText, source);
|
|
813
|
+
const endPosition = viewModel.getSelection().getStartPosition();
|
|
814
|
+
if (source === 'keyboard') {
|
|
815
|
+
this._onDidPaste.fire({
|
|
816
|
+
range: ( new Range(
|
|
817
|
+
startPosition.lineNumber,
|
|
818
|
+
startPosition.column,
|
|
819
|
+
endPosition.lineNumber,
|
|
820
|
+
endPosition.column
|
|
821
|
+
)),
|
|
822
|
+
languageId: mode
|
|
823
|
+
});
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
_cut(source) {
|
|
827
|
+
if (!this._modelData) {
|
|
828
|
+
return;
|
|
829
|
+
}
|
|
830
|
+
this._modelData.viewModel.cut(source);
|
|
831
|
+
}
|
|
832
|
+
_triggerEditorCommand(source, handlerId, payload) {
|
|
833
|
+
const command = EditorExtensionsRegistry.getEditorCommand(handlerId);
|
|
834
|
+
if (command) {
|
|
835
|
+
payload = payload || {};
|
|
836
|
+
payload.source = source;
|
|
837
|
+
this._instantiationService.invokeFunction((accessor) => {
|
|
838
|
+
Promise.resolve(command.runEditorCommand(accessor, this, payload)).then(undefined, onUnexpectedError);
|
|
839
|
+
});
|
|
840
|
+
return true;
|
|
841
|
+
}
|
|
842
|
+
return false;
|
|
843
|
+
}
|
|
844
|
+
_getViewModel() {
|
|
845
|
+
if (!this._modelData) {
|
|
846
|
+
return null;
|
|
847
|
+
}
|
|
848
|
+
return this._modelData.viewModel;
|
|
849
|
+
}
|
|
850
|
+
pushUndoStop() {
|
|
851
|
+
if (!this._modelData) {
|
|
852
|
+
return false;
|
|
853
|
+
}
|
|
854
|
+
if (this._configuration.options.get(90 )) {
|
|
855
|
+
return false;
|
|
856
|
+
}
|
|
857
|
+
this._modelData.model.pushStackElement();
|
|
858
|
+
return true;
|
|
859
|
+
}
|
|
860
|
+
popUndoStop() {
|
|
861
|
+
if (!this._modelData) {
|
|
862
|
+
return false;
|
|
863
|
+
}
|
|
864
|
+
if (this._configuration.options.get(90 )) {
|
|
865
|
+
return false;
|
|
866
|
+
}
|
|
867
|
+
this._modelData.model.popStackElement();
|
|
868
|
+
return true;
|
|
869
|
+
}
|
|
870
|
+
executeEdits(source, edits, endCursorState) {
|
|
871
|
+
if (!this._modelData) {
|
|
872
|
+
return false;
|
|
873
|
+
}
|
|
874
|
+
if (this._configuration.options.get(90 )) {
|
|
875
|
+
return false;
|
|
876
|
+
}
|
|
877
|
+
let cursorStateComputer;
|
|
878
|
+
if (!endCursorState) {
|
|
879
|
+
cursorStateComputer = () => null;
|
|
880
|
+
}
|
|
881
|
+
else if (Array.isArray(endCursorState)) {
|
|
882
|
+
cursorStateComputer = () => endCursorState;
|
|
883
|
+
}
|
|
884
|
+
else {
|
|
885
|
+
cursorStateComputer = endCursorState;
|
|
886
|
+
}
|
|
887
|
+
this._modelData.viewModel.executeEdits(source, edits, cursorStateComputer);
|
|
888
|
+
return true;
|
|
889
|
+
}
|
|
890
|
+
executeCommand(source, command) {
|
|
891
|
+
if (!this._modelData) {
|
|
892
|
+
return;
|
|
893
|
+
}
|
|
894
|
+
this._modelData.viewModel.executeCommand(command, source);
|
|
895
|
+
}
|
|
896
|
+
executeCommands(source, commands) {
|
|
897
|
+
if (!this._modelData) {
|
|
898
|
+
return;
|
|
899
|
+
}
|
|
900
|
+
this._modelData.viewModel.executeCommands(commands, source);
|
|
901
|
+
}
|
|
902
|
+
createDecorationsCollection(decorations) {
|
|
903
|
+
return ( new EditorDecorationsCollection(this, decorations));
|
|
904
|
+
}
|
|
905
|
+
changeDecorations(callback) {
|
|
906
|
+
if (!this._modelData) {
|
|
907
|
+
return null;
|
|
908
|
+
}
|
|
909
|
+
return this._modelData.model.changeDecorations(callback, this._id);
|
|
910
|
+
}
|
|
911
|
+
getLineDecorations(lineNumber) {
|
|
912
|
+
if (!this._modelData) {
|
|
913
|
+
return null;
|
|
914
|
+
}
|
|
915
|
+
return this._modelData.model.getLineDecorations(lineNumber, this._id, filterValidationDecorations(this._configuration.options));
|
|
916
|
+
}
|
|
917
|
+
getDecorationsInRange(range) {
|
|
918
|
+
if (!this._modelData) {
|
|
919
|
+
return null;
|
|
920
|
+
}
|
|
921
|
+
return this._modelData.model.getDecorationsInRange(range, this._id, filterValidationDecorations(this._configuration.options));
|
|
922
|
+
}
|
|
923
|
+
deltaDecorations(oldDecorations, newDecorations) {
|
|
924
|
+
if (!this._modelData) {
|
|
925
|
+
return [];
|
|
926
|
+
}
|
|
927
|
+
if (oldDecorations.length === 0 && newDecorations.length === 0) {
|
|
928
|
+
return oldDecorations;
|
|
929
|
+
}
|
|
930
|
+
return this._modelData.model.deltaDecorations(oldDecorations, newDecorations, this._id);
|
|
931
|
+
}
|
|
932
|
+
removeDecorations(decorationIds) {
|
|
933
|
+
if (!this._modelData || decorationIds.length === 0) {
|
|
934
|
+
return;
|
|
935
|
+
}
|
|
936
|
+
this._modelData.model.changeDecorations((changeAccessor) => {
|
|
937
|
+
changeAccessor.deltaDecorations(decorationIds, []);
|
|
938
|
+
});
|
|
939
|
+
}
|
|
940
|
+
setDecorationsByType(description, decorationTypeKey, decorationOptions) {
|
|
941
|
+
const newDecorationsSubTypes = {};
|
|
942
|
+
const oldDecorationsSubTypes = this._decorationTypeSubtypes[decorationTypeKey] || {};
|
|
943
|
+
this._decorationTypeSubtypes[decorationTypeKey] = newDecorationsSubTypes;
|
|
944
|
+
const newModelDecorations = [];
|
|
945
|
+
for (const decorationOption of decorationOptions) {
|
|
946
|
+
let typeKey = decorationTypeKey;
|
|
947
|
+
if (decorationOption.renderOptions) {
|
|
948
|
+
const subType = ( hash(decorationOption.renderOptions).toString(16));
|
|
949
|
+
typeKey = decorationTypeKey + '-' + subType;
|
|
950
|
+
if (!oldDecorationsSubTypes[subType] && !newDecorationsSubTypes[subType]) {
|
|
951
|
+
this._registerDecorationType(description, typeKey, decorationOption.renderOptions, decorationTypeKey);
|
|
952
|
+
}
|
|
953
|
+
newDecorationsSubTypes[subType] = true;
|
|
954
|
+
}
|
|
955
|
+
const opts = this._resolveDecorationOptions(typeKey, !!decorationOption.hoverMessage);
|
|
956
|
+
if (decorationOption.hoverMessage) {
|
|
957
|
+
opts.hoverMessage = decorationOption.hoverMessage;
|
|
958
|
+
}
|
|
959
|
+
newModelDecorations.push({ range: decorationOption.range, options: opts });
|
|
960
|
+
}
|
|
961
|
+
for (const subType in oldDecorationsSubTypes) {
|
|
962
|
+
if (!newDecorationsSubTypes[subType]) {
|
|
963
|
+
this._removeDecorationType(decorationTypeKey + '-' + subType);
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
const oldDecorationsIds = this._decorationTypeKeysToIds[decorationTypeKey] || [];
|
|
967
|
+
this._decorationTypeKeysToIds[decorationTypeKey] = this.deltaDecorations(oldDecorationsIds, newModelDecorations);
|
|
968
|
+
}
|
|
969
|
+
setDecorationsByTypeFast(decorationTypeKey, ranges) {
|
|
970
|
+
const oldDecorationsSubTypes = this._decorationTypeSubtypes[decorationTypeKey] || {};
|
|
971
|
+
for (const subType in oldDecorationsSubTypes) {
|
|
972
|
+
this._removeDecorationType(decorationTypeKey + '-' + subType);
|
|
973
|
+
}
|
|
974
|
+
this._decorationTypeSubtypes[decorationTypeKey] = {};
|
|
975
|
+
const opts = ModelDecorationOptions.createDynamic(this._resolveDecorationOptions(decorationTypeKey, false));
|
|
976
|
+
const newModelDecorations = ( new Array(ranges.length));
|
|
977
|
+
for (let i = 0, len = ranges.length; i < len; i++) {
|
|
978
|
+
newModelDecorations[i] = { range: ranges[i], options: opts };
|
|
979
|
+
}
|
|
980
|
+
const oldDecorationsIds = this._decorationTypeKeysToIds[decorationTypeKey] || [];
|
|
981
|
+
this._decorationTypeKeysToIds[decorationTypeKey] = this.deltaDecorations(oldDecorationsIds, newModelDecorations);
|
|
982
|
+
}
|
|
983
|
+
removeDecorationsByType(decorationTypeKey) {
|
|
984
|
+
const oldDecorationsIds = this._decorationTypeKeysToIds[decorationTypeKey];
|
|
985
|
+
if (oldDecorationsIds) {
|
|
986
|
+
this.deltaDecorations(oldDecorationsIds, []);
|
|
987
|
+
}
|
|
988
|
+
if (this._decorationTypeKeysToIds.hasOwnProperty(decorationTypeKey)) {
|
|
989
|
+
delete this._decorationTypeKeysToIds[decorationTypeKey];
|
|
990
|
+
}
|
|
991
|
+
if (this._decorationTypeSubtypes.hasOwnProperty(decorationTypeKey)) {
|
|
992
|
+
delete this._decorationTypeSubtypes[decorationTypeKey];
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
getLayoutInfo() {
|
|
996
|
+
const options = this._configuration.options;
|
|
997
|
+
const layoutInfo = options.get(143 );
|
|
998
|
+
return layoutInfo;
|
|
999
|
+
}
|
|
1000
|
+
createOverviewRuler(cssClassName) {
|
|
1001
|
+
if (!this._modelData || !this._modelData.hasRealView) {
|
|
1002
|
+
return null;
|
|
1003
|
+
}
|
|
1004
|
+
return this._modelData.view.createOverviewRuler(cssClassName);
|
|
1005
|
+
}
|
|
1006
|
+
getContainerDomNode() {
|
|
1007
|
+
return this._domElement;
|
|
1008
|
+
}
|
|
1009
|
+
getDomNode() {
|
|
1010
|
+
if (!this._modelData || !this._modelData.hasRealView) {
|
|
1011
|
+
return null;
|
|
1012
|
+
}
|
|
1013
|
+
return this._modelData.view.domNode.domNode;
|
|
1014
|
+
}
|
|
1015
|
+
delegateVerticalScrollbarPointerDown(browserEvent) {
|
|
1016
|
+
if (!this._modelData || !this._modelData.hasRealView) {
|
|
1017
|
+
return;
|
|
1018
|
+
}
|
|
1019
|
+
this._modelData.view.delegateVerticalScrollbarPointerDown(browserEvent);
|
|
1020
|
+
}
|
|
1021
|
+
delegateScrollFromMouseWheelEvent(browserEvent) {
|
|
1022
|
+
if (!this._modelData || !this._modelData.hasRealView) {
|
|
1023
|
+
return;
|
|
1024
|
+
}
|
|
1025
|
+
this._modelData.view.delegateScrollFromMouseWheelEvent(browserEvent);
|
|
1026
|
+
}
|
|
1027
|
+
layout(dimension, postponeRendering = false) {
|
|
1028
|
+
this._configuration.observeContainer(dimension);
|
|
1029
|
+
if (!postponeRendering) {
|
|
1030
|
+
this.render();
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
focus() {
|
|
1034
|
+
if (!this._modelData || !this._modelData.hasRealView) {
|
|
1035
|
+
return;
|
|
1036
|
+
}
|
|
1037
|
+
this._modelData.view.focus();
|
|
1038
|
+
}
|
|
1039
|
+
hasTextFocus() {
|
|
1040
|
+
if (!this._modelData || !this._modelData.hasRealView) {
|
|
1041
|
+
return false;
|
|
1042
|
+
}
|
|
1043
|
+
return this._modelData.view.isFocused();
|
|
1044
|
+
}
|
|
1045
|
+
hasWidgetFocus() {
|
|
1046
|
+
return this._focusTracker && this._focusTracker.hasFocus();
|
|
1047
|
+
}
|
|
1048
|
+
addContentWidget(widget) {
|
|
1049
|
+
const widgetData = {
|
|
1050
|
+
widget: widget,
|
|
1051
|
+
position: widget.getPosition()
|
|
1052
|
+
};
|
|
1053
|
+
if (this._contentWidgets.hasOwnProperty(widget.getId())) {
|
|
1054
|
+
console.warn('Overwriting a content widget with the same id:' + widget.getId());
|
|
1055
|
+
}
|
|
1056
|
+
this._contentWidgets[widget.getId()] = widgetData;
|
|
1057
|
+
if (this._modelData && this._modelData.hasRealView) {
|
|
1058
|
+
this._modelData.view.addContentWidget(widgetData);
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
layoutContentWidget(widget) {
|
|
1062
|
+
const widgetId = widget.getId();
|
|
1063
|
+
if (this._contentWidgets.hasOwnProperty(widgetId)) {
|
|
1064
|
+
const widgetData = this._contentWidgets[widgetId];
|
|
1065
|
+
widgetData.position = widget.getPosition();
|
|
1066
|
+
if (this._modelData && this._modelData.hasRealView) {
|
|
1067
|
+
this._modelData.view.layoutContentWidget(widgetData);
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
removeContentWidget(widget) {
|
|
1072
|
+
const widgetId = widget.getId();
|
|
1073
|
+
if (this._contentWidgets.hasOwnProperty(widgetId)) {
|
|
1074
|
+
const widgetData = this._contentWidgets[widgetId];
|
|
1075
|
+
delete this._contentWidgets[widgetId];
|
|
1076
|
+
if (this._modelData && this._modelData.hasRealView) {
|
|
1077
|
+
this._modelData.view.removeContentWidget(widgetData);
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
addOverlayWidget(widget) {
|
|
1082
|
+
const widgetData = {
|
|
1083
|
+
widget: widget,
|
|
1084
|
+
position: widget.getPosition()
|
|
1085
|
+
};
|
|
1086
|
+
if (this._overlayWidgets.hasOwnProperty(widget.getId())) {
|
|
1087
|
+
console.warn('Overwriting an overlay widget with the same id.');
|
|
1088
|
+
}
|
|
1089
|
+
this._overlayWidgets[widget.getId()] = widgetData;
|
|
1090
|
+
if (this._modelData && this._modelData.hasRealView) {
|
|
1091
|
+
this._modelData.view.addOverlayWidget(widgetData);
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
layoutOverlayWidget(widget) {
|
|
1095
|
+
const widgetId = widget.getId();
|
|
1096
|
+
if (this._overlayWidgets.hasOwnProperty(widgetId)) {
|
|
1097
|
+
const widgetData = this._overlayWidgets[widgetId];
|
|
1098
|
+
widgetData.position = widget.getPosition();
|
|
1099
|
+
if (this._modelData && this._modelData.hasRealView) {
|
|
1100
|
+
this._modelData.view.layoutOverlayWidget(widgetData);
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
removeOverlayWidget(widget) {
|
|
1105
|
+
const widgetId = widget.getId();
|
|
1106
|
+
if (this._overlayWidgets.hasOwnProperty(widgetId)) {
|
|
1107
|
+
const widgetData = this._overlayWidgets[widgetId];
|
|
1108
|
+
delete this._overlayWidgets[widgetId];
|
|
1109
|
+
if (this._modelData && this._modelData.hasRealView) {
|
|
1110
|
+
this._modelData.view.removeOverlayWidget(widgetData);
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
addGlyphMarginWidget(widget) {
|
|
1115
|
+
const widgetData = {
|
|
1116
|
+
widget: widget,
|
|
1117
|
+
position: widget.getPosition()
|
|
1118
|
+
};
|
|
1119
|
+
if (this._glyphMarginWidgets.hasOwnProperty(widget.getId())) {
|
|
1120
|
+
console.warn('Overwriting a glyph margin widget with the same id.');
|
|
1121
|
+
}
|
|
1122
|
+
this._glyphMarginWidgets[widget.getId()] = widgetData;
|
|
1123
|
+
if (this._modelData && this._modelData.hasRealView) {
|
|
1124
|
+
this._modelData.view.addGlyphMarginWidget(widgetData);
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
layoutGlyphMarginWidget(widget) {
|
|
1128
|
+
const widgetId = widget.getId();
|
|
1129
|
+
if (this._glyphMarginWidgets.hasOwnProperty(widgetId)) {
|
|
1130
|
+
const widgetData = this._glyphMarginWidgets[widgetId];
|
|
1131
|
+
widgetData.position = widget.getPosition();
|
|
1132
|
+
if (this._modelData && this._modelData.hasRealView) {
|
|
1133
|
+
this._modelData.view.layoutGlyphMarginWidget(widgetData);
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
removeGlyphMarginWidget(widget) {
|
|
1138
|
+
const widgetId = widget.getId();
|
|
1139
|
+
if (this._glyphMarginWidgets.hasOwnProperty(widgetId)) {
|
|
1140
|
+
const widgetData = this._glyphMarginWidgets[widgetId];
|
|
1141
|
+
delete this._glyphMarginWidgets[widgetId];
|
|
1142
|
+
if (this._modelData && this._modelData.hasRealView) {
|
|
1143
|
+
this._modelData.view.removeGlyphMarginWidget(widgetData);
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
changeViewZones(callback) {
|
|
1148
|
+
if (!this._modelData || !this._modelData.hasRealView) {
|
|
1149
|
+
return;
|
|
1150
|
+
}
|
|
1151
|
+
this._modelData.view.change(callback);
|
|
1152
|
+
}
|
|
1153
|
+
getTargetAtClientPoint(clientX, clientY) {
|
|
1154
|
+
if (!this._modelData || !this._modelData.hasRealView) {
|
|
1155
|
+
return null;
|
|
1156
|
+
}
|
|
1157
|
+
return this._modelData.view.getTargetAtClientPoint(clientX, clientY);
|
|
1158
|
+
}
|
|
1159
|
+
getScrolledVisiblePosition(rawPosition) {
|
|
1160
|
+
if (!this._modelData || !this._modelData.hasRealView) {
|
|
1161
|
+
return null;
|
|
1162
|
+
}
|
|
1163
|
+
const position = this._modelData.model.validatePosition(rawPosition);
|
|
1164
|
+
const options = this._configuration.options;
|
|
1165
|
+
const layoutInfo = options.get(143 );
|
|
1166
|
+
const top = CodeEditorWidget_1._getVerticalOffsetForPosition(this._modelData, position.lineNumber, position.column) - this.getScrollTop();
|
|
1167
|
+
const left = this._modelData.view.getOffsetForColumn(position.lineNumber, position.column) + layoutInfo.glyphMarginWidth + layoutInfo.lineNumbersWidth + layoutInfo.decorationsWidth - this.getScrollLeft();
|
|
1168
|
+
return {
|
|
1169
|
+
top: top,
|
|
1170
|
+
left: left,
|
|
1171
|
+
height: options.get(66 )
|
|
1172
|
+
};
|
|
1173
|
+
}
|
|
1174
|
+
getOffsetForColumn(lineNumber, column) {
|
|
1175
|
+
if (!this._modelData || !this._modelData.hasRealView) {
|
|
1176
|
+
return -1;
|
|
1177
|
+
}
|
|
1178
|
+
return this._modelData.view.getOffsetForColumn(lineNumber, column);
|
|
1179
|
+
}
|
|
1180
|
+
render(forceRedraw = false) {
|
|
1181
|
+
if (!this._modelData || !this._modelData.hasRealView) {
|
|
1182
|
+
return;
|
|
1183
|
+
}
|
|
1184
|
+
this._modelData.view.render(true, forceRedraw);
|
|
1185
|
+
}
|
|
1186
|
+
setAriaOptions(options) {
|
|
1187
|
+
if (!this._modelData || !this._modelData.hasRealView) {
|
|
1188
|
+
return;
|
|
1189
|
+
}
|
|
1190
|
+
this._modelData.view.setAriaOptions(options);
|
|
1191
|
+
}
|
|
1192
|
+
applyFontInfo(target) {
|
|
1193
|
+
applyFontInfo(target, this._configuration.options.get(50 ));
|
|
1194
|
+
}
|
|
1195
|
+
setBanner(domNode, domNodeHeight) {
|
|
1196
|
+
if (this._bannerDomNode && this._domElement.contains(this._bannerDomNode)) {
|
|
1197
|
+
this._domElement.removeChild(this._bannerDomNode);
|
|
1198
|
+
}
|
|
1199
|
+
this._bannerDomNode = domNode;
|
|
1200
|
+
this._configuration.setReservedHeight(domNode ? domNodeHeight : 0);
|
|
1201
|
+
if (this._bannerDomNode) {
|
|
1202
|
+
this._domElement.prepend(this._bannerDomNode);
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
_attachModel(model) {
|
|
1206
|
+
if (!model) {
|
|
1207
|
+
this._modelData = null;
|
|
1208
|
+
return;
|
|
1209
|
+
}
|
|
1210
|
+
const listenersToRemove = [];
|
|
1211
|
+
this._domElement.setAttribute('data-mode-id', model.getLanguageId());
|
|
1212
|
+
this._configuration.setIsDominatedByLongLines(model.isDominatedByLongLines());
|
|
1213
|
+
this._configuration.setModelLineCount(model.getLineCount());
|
|
1214
|
+
const attachedView = model.onBeforeAttached();
|
|
1215
|
+
const viewModel = ( new ViewModel(
|
|
1216
|
+
this._id,
|
|
1217
|
+
this._configuration,
|
|
1218
|
+
model,
|
|
1219
|
+
DOMLineBreaksComputerFactory.create(getWindow(this._domElement)),
|
|
1220
|
+
MonospaceLineBreaksComputerFactory.create(this._configuration.options),
|
|
1221
|
+
(callback) => scheduleAtNextAnimationFrame(getWindow(this._domElement), callback),
|
|
1222
|
+
this.languageConfigurationService,
|
|
1223
|
+
this._themeService,
|
|
1224
|
+
attachedView
|
|
1225
|
+
));
|
|
1226
|
+
listenersToRemove.push(model.onWillDispose(() => this.setModel(null)));
|
|
1227
|
+
listenersToRemove.push(viewModel.onEvent((e) => {
|
|
1228
|
+
switch (e.kind) {
|
|
1229
|
+
case 0 :
|
|
1230
|
+
this._onDidContentSizeChange.fire(e);
|
|
1231
|
+
break;
|
|
1232
|
+
case 1 :
|
|
1233
|
+
this._editorTextFocus.setValue(e.hasFocus);
|
|
1234
|
+
break;
|
|
1235
|
+
case 2 :
|
|
1236
|
+
this._onDidScrollChange.fire(e);
|
|
1237
|
+
break;
|
|
1238
|
+
case 3 :
|
|
1239
|
+
this._onDidChangeViewZones.fire();
|
|
1240
|
+
break;
|
|
1241
|
+
case 4 :
|
|
1242
|
+
this._onDidChangeHiddenAreas.fire();
|
|
1243
|
+
break;
|
|
1244
|
+
case 5 :
|
|
1245
|
+
this._onDidAttemptReadOnlyEdit.fire();
|
|
1246
|
+
break;
|
|
1247
|
+
case 6 : {
|
|
1248
|
+
if (e.reachedMaxCursorCount) {
|
|
1249
|
+
const multiCursorLimit = this.getOption(79 );
|
|
1250
|
+
const message = ( localizeWithPath(
|
|
1251
|
+
'vs/editor/browser/widget/codeEditorWidget',
|
|
1252
|
+
'cursors.maximum',
|
|
1253
|
+
"The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.",
|
|
1254
|
+
multiCursorLimit
|
|
1255
|
+
));
|
|
1256
|
+
this._notificationService.prompt(Severity.Warning, message, [
|
|
1257
|
+
{
|
|
1258
|
+
label: 'Find and Replace',
|
|
1259
|
+
run: () => {
|
|
1260
|
+
this._commandService.executeCommand('editor.action.startFindReplaceAction');
|
|
1261
|
+
}
|
|
1262
|
+
},
|
|
1263
|
+
{
|
|
1264
|
+
label: ( localizeWithPath(
|
|
1265
|
+
'vs/editor/browser/widget/codeEditorWidget',
|
|
1266
|
+
'goToSetting',
|
|
1267
|
+
'Increase Multi Cursor Limit'
|
|
1268
|
+
)),
|
|
1269
|
+
run: () => {
|
|
1270
|
+
this._commandService.executeCommand('workbench.action.openSettings2', {
|
|
1271
|
+
query: 'editor.multiCursorLimit'
|
|
1272
|
+
});
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
]);
|
|
1276
|
+
}
|
|
1277
|
+
const positions = [];
|
|
1278
|
+
for (let i = 0, len = e.selections.length; i < len; i++) {
|
|
1279
|
+
positions[i] = e.selections[i].getPosition();
|
|
1280
|
+
}
|
|
1281
|
+
const e1 = {
|
|
1282
|
+
position: positions[0],
|
|
1283
|
+
secondaryPositions: positions.slice(1),
|
|
1284
|
+
reason: e.reason,
|
|
1285
|
+
source: e.source
|
|
1286
|
+
};
|
|
1287
|
+
this._onDidChangeCursorPosition.fire(e1);
|
|
1288
|
+
const e2 = {
|
|
1289
|
+
selection: e.selections[0],
|
|
1290
|
+
secondarySelections: e.selections.slice(1),
|
|
1291
|
+
modelVersionId: e.modelVersionId,
|
|
1292
|
+
oldSelections: e.oldSelections,
|
|
1293
|
+
oldModelVersionId: e.oldModelVersionId,
|
|
1294
|
+
source: e.source,
|
|
1295
|
+
reason: e.reason
|
|
1296
|
+
};
|
|
1297
|
+
this._onDidChangeCursorSelection.fire(e2);
|
|
1298
|
+
break;
|
|
1299
|
+
}
|
|
1300
|
+
case 7 :
|
|
1301
|
+
this._onDidChangeModelDecorations.fire(e.event);
|
|
1302
|
+
break;
|
|
1303
|
+
case 8 :
|
|
1304
|
+
this._domElement.setAttribute('data-mode-id', model.getLanguageId());
|
|
1305
|
+
this._onDidChangeModelLanguage.fire(e.event);
|
|
1306
|
+
break;
|
|
1307
|
+
case 9 :
|
|
1308
|
+
this._onDidChangeModelLanguageConfiguration.fire(e.event);
|
|
1309
|
+
break;
|
|
1310
|
+
case 10 :
|
|
1311
|
+
this._onDidChangeModelContent.fire(e.event);
|
|
1312
|
+
break;
|
|
1313
|
+
case 11 :
|
|
1314
|
+
this._onDidChangeModelOptions.fire(e.event);
|
|
1315
|
+
break;
|
|
1316
|
+
case 12 :
|
|
1317
|
+
this._onDidChangeModelTokens.fire(e.event);
|
|
1318
|
+
break;
|
|
1319
|
+
}
|
|
1320
|
+
}));
|
|
1321
|
+
const [view, hasRealView] = this._createView(viewModel);
|
|
1322
|
+
if (hasRealView) {
|
|
1323
|
+
this._domElement.appendChild(view.domNode.domNode);
|
|
1324
|
+
let keys = ( Object.keys(this._contentWidgets));
|
|
1325
|
+
for (let i = 0, len = keys.length; i < len; i++) {
|
|
1326
|
+
const widgetId = keys[i];
|
|
1327
|
+
view.addContentWidget(this._contentWidgets[widgetId]);
|
|
1328
|
+
}
|
|
1329
|
+
keys = ( Object.keys(this._overlayWidgets));
|
|
1330
|
+
for (let i = 0, len = keys.length; i < len; i++) {
|
|
1331
|
+
const widgetId = keys[i];
|
|
1332
|
+
view.addOverlayWidget(this._overlayWidgets[widgetId]);
|
|
1333
|
+
}
|
|
1334
|
+
keys = ( Object.keys(this._glyphMarginWidgets));
|
|
1335
|
+
for (let i = 0, len = keys.length; i < len; i++) {
|
|
1336
|
+
const widgetId = keys[i];
|
|
1337
|
+
view.addGlyphMarginWidget(this._glyphMarginWidgets[widgetId]);
|
|
1338
|
+
}
|
|
1339
|
+
view.render(false, true);
|
|
1340
|
+
view.domNode.domNode.setAttribute('data-uri', ( model.uri.toString()));
|
|
1341
|
+
}
|
|
1342
|
+
this._modelData = ( new ModelData(model, viewModel, view, hasRealView, listenersToRemove, attachedView));
|
|
1343
|
+
}
|
|
1344
|
+
_createView(viewModel) {
|
|
1345
|
+
let commandDelegate;
|
|
1346
|
+
if (this.isSimpleWidget) {
|
|
1347
|
+
commandDelegate = {
|
|
1348
|
+
paste: (text, pasteOnNewLine, multicursorText, mode) => {
|
|
1349
|
+
this._paste('keyboard', text, pasteOnNewLine, multicursorText, mode);
|
|
1350
|
+
},
|
|
1351
|
+
type: (text) => {
|
|
1352
|
+
this._type('keyboard', text);
|
|
1353
|
+
},
|
|
1354
|
+
compositionType: (text, replacePrevCharCnt, replaceNextCharCnt, positionDelta) => {
|
|
1355
|
+
this._compositionType('keyboard', text, replacePrevCharCnt, replaceNextCharCnt, positionDelta);
|
|
1356
|
+
},
|
|
1357
|
+
startComposition: () => {
|
|
1358
|
+
this._startComposition();
|
|
1359
|
+
},
|
|
1360
|
+
endComposition: () => {
|
|
1361
|
+
this._endComposition('keyboard');
|
|
1362
|
+
},
|
|
1363
|
+
cut: () => {
|
|
1364
|
+
this._cut('keyboard');
|
|
1365
|
+
}
|
|
1366
|
+
};
|
|
1367
|
+
}
|
|
1368
|
+
else {
|
|
1369
|
+
commandDelegate = {
|
|
1370
|
+
paste: (text, pasteOnNewLine, multicursorText, mode) => {
|
|
1371
|
+
const payload = { text, pasteOnNewLine, multicursorText, mode };
|
|
1372
|
+
this._commandService.executeCommand("paste" , payload);
|
|
1373
|
+
},
|
|
1374
|
+
type: (text) => {
|
|
1375
|
+
const payload = { text };
|
|
1376
|
+
this._commandService.executeCommand("type" , payload);
|
|
1377
|
+
},
|
|
1378
|
+
compositionType: (text, replacePrevCharCnt, replaceNextCharCnt, positionDelta) => {
|
|
1379
|
+
if (replaceNextCharCnt || positionDelta) {
|
|
1380
|
+
const payload = { text, replacePrevCharCnt, replaceNextCharCnt, positionDelta };
|
|
1381
|
+
this._commandService.executeCommand("compositionType" , payload);
|
|
1382
|
+
}
|
|
1383
|
+
else {
|
|
1384
|
+
const payload = { text, replaceCharCnt: replacePrevCharCnt };
|
|
1385
|
+
this._commandService.executeCommand("replacePreviousChar" , payload);
|
|
1386
|
+
}
|
|
1387
|
+
},
|
|
1388
|
+
startComposition: () => {
|
|
1389
|
+
this._commandService.executeCommand("compositionStart" , {});
|
|
1390
|
+
},
|
|
1391
|
+
endComposition: () => {
|
|
1392
|
+
this._commandService.executeCommand("compositionEnd" , {});
|
|
1393
|
+
},
|
|
1394
|
+
cut: () => {
|
|
1395
|
+
this._commandService.executeCommand("cut" , {});
|
|
1396
|
+
}
|
|
1397
|
+
};
|
|
1398
|
+
}
|
|
1399
|
+
const viewUserInputEvents = ( new ViewUserInputEvents(viewModel.coordinatesConverter));
|
|
1400
|
+
viewUserInputEvents.onKeyDown = (e) => this._onKeyDown.fire(e);
|
|
1401
|
+
viewUserInputEvents.onKeyUp = (e) => this._onKeyUp.fire(e);
|
|
1402
|
+
viewUserInputEvents.onContextMenu = (e) => this._onContextMenu.fire(e);
|
|
1403
|
+
viewUserInputEvents.onMouseMove = (e) => this._onMouseMove.fire(e);
|
|
1404
|
+
viewUserInputEvents.onMouseLeave = (e) => this._onMouseLeave.fire(e);
|
|
1405
|
+
viewUserInputEvents.onMouseDown = (e) => this._onMouseDown.fire(e);
|
|
1406
|
+
viewUserInputEvents.onMouseUp = (e) => this._onMouseUp.fire(e);
|
|
1407
|
+
viewUserInputEvents.onMouseDrag = (e) => this._onMouseDrag.fire(e);
|
|
1408
|
+
viewUserInputEvents.onMouseDrop = (e) => this._onMouseDrop.fire(e);
|
|
1409
|
+
viewUserInputEvents.onMouseDropCanceled = (e) => this._onMouseDropCanceled.fire(e);
|
|
1410
|
+
viewUserInputEvents.onMouseWheel = (e) => this._onMouseWheel.fire(e);
|
|
1411
|
+
const view = ( new View(
|
|
1412
|
+
commandDelegate,
|
|
1413
|
+
this._configuration,
|
|
1414
|
+
this._themeService.getColorTheme(),
|
|
1415
|
+
viewModel,
|
|
1416
|
+
viewUserInputEvents,
|
|
1417
|
+
this._overflowWidgetsDomNode,
|
|
1418
|
+
this._instantiationService
|
|
1419
|
+
));
|
|
1420
|
+
return [view, true];
|
|
1421
|
+
}
|
|
1422
|
+
_postDetachModelCleanup(detachedModel) {
|
|
1423
|
+
detachedModel?.removeAllDecorationsWithOwnerId(this._id);
|
|
1424
|
+
}
|
|
1425
|
+
_detachModel() {
|
|
1426
|
+
if (!this._modelData) {
|
|
1427
|
+
return null;
|
|
1428
|
+
}
|
|
1429
|
+
const model = this._modelData.model;
|
|
1430
|
+
const removeDomNode = this._modelData.hasRealView ? this._modelData.view.domNode.domNode : null;
|
|
1431
|
+
this._modelData.dispose();
|
|
1432
|
+
this._modelData = null;
|
|
1433
|
+
this._domElement.removeAttribute('data-mode-id');
|
|
1434
|
+
if (removeDomNode && this._domElement.contains(removeDomNode)) {
|
|
1435
|
+
this._domElement.removeChild(removeDomNode);
|
|
1436
|
+
}
|
|
1437
|
+
if (this._bannerDomNode && this._domElement.contains(this._bannerDomNode)) {
|
|
1438
|
+
this._domElement.removeChild(this._bannerDomNode);
|
|
1439
|
+
}
|
|
1440
|
+
return model;
|
|
1441
|
+
}
|
|
1442
|
+
_registerDecorationType(description, key, options, parentTypeKey) {
|
|
1443
|
+
this._codeEditorService.registerDecorationType(description, key, options, parentTypeKey, this);
|
|
1444
|
+
}
|
|
1445
|
+
_removeDecorationType(key) {
|
|
1446
|
+
this._codeEditorService.removeDecorationType(key);
|
|
1447
|
+
}
|
|
1448
|
+
_resolveDecorationOptions(typeKey, writable) {
|
|
1449
|
+
return this._codeEditorService.resolveDecorationOptions(typeKey, writable);
|
|
1450
|
+
}
|
|
1451
|
+
getTelemetryData() {
|
|
1452
|
+
return this._telemetryData;
|
|
1453
|
+
}
|
|
1454
|
+
hasModel() {
|
|
1455
|
+
return (this._modelData !== null);
|
|
1456
|
+
}
|
|
1457
|
+
showDropIndicatorAt(position) {
|
|
1458
|
+
const newDecorations = [{
|
|
1459
|
+
range: ( new Range(position.lineNumber, position.column, position.lineNumber, position.column)),
|
|
1460
|
+
options: CodeEditorWidget_1.dropIntoEditorDecorationOptions
|
|
1461
|
+
}];
|
|
1462
|
+
this._dropIntoEditorDecorations.set(newDecorations);
|
|
1463
|
+
this.revealPosition(position, 1 );
|
|
1464
|
+
}
|
|
1465
|
+
removeDropIndicator() {
|
|
1466
|
+
this._dropIntoEditorDecorations.clear();
|
|
1467
|
+
}
|
|
1468
|
+
setContextValue(key, value) {
|
|
1469
|
+
this._contextKeyService.createKey(key, value);
|
|
1470
|
+
}
|
|
1471
|
+
};
|
|
1472
|
+
CodeEditorWidget = CodeEditorWidget_1 = ( __decorate([
|
|
1473
|
+
( __param(3, IInstantiationService)),
|
|
1474
|
+
( __param(4, ICodeEditorService)),
|
|
1475
|
+
( __param(5, ICommandService)),
|
|
1476
|
+
( __param(6, IContextKeyService)),
|
|
1477
|
+
( __param(7, IThemeService)),
|
|
1478
|
+
( __param(8, INotificationService)),
|
|
1479
|
+
( __param(9, IAccessibilityService)),
|
|
1480
|
+
( __param(10, ILanguageConfigurationService)),
|
|
1481
|
+
( __param(11, ILanguageFeaturesService))
|
|
1482
|
+
], CodeEditorWidget));
|
|
1483
|
+
class BooleanEventEmitter extends Disposable {
|
|
1484
|
+
constructor(_emitterOptions) {
|
|
1485
|
+
super();
|
|
1486
|
+
this._emitterOptions = _emitterOptions;
|
|
1487
|
+
this._onDidChangeToTrue = this._register(( new Emitter(this._emitterOptions)));
|
|
1488
|
+
this.onDidChangeToTrue = this._onDidChangeToTrue.event;
|
|
1489
|
+
this._onDidChangeToFalse = this._register(( new Emitter(this._emitterOptions)));
|
|
1490
|
+
this.onDidChangeToFalse = this._onDidChangeToFalse.event;
|
|
1491
|
+
this._value = 0 ;
|
|
1492
|
+
}
|
|
1493
|
+
setValue(_value) {
|
|
1494
|
+
const value = ((_value ? 2 : 1) );
|
|
1495
|
+
if (this._value === value) {
|
|
1496
|
+
return;
|
|
1497
|
+
}
|
|
1498
|
+
this._value = value;
|
|
1499
|
+
if (this._value === 2 ) {
|
|
1500
|
+
this._onDidChangeToTrue.fire();
|
|
1501
|
+
}
|
|
1502
|
+
else if (this._value === 1 ) {
|
|
1503
|
+
this._onDidChangeToFalse.fire();
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
class InteractionEmitter extends Emitter {
|
|
1508
|
+
constructor(_contributions, deliveryQueue) {
|
|
1509
|
+
super({ deliveryQueue });
|
|
1510
|
+
this._contributions = _contributions;
|
|
1511
|
+
}
|
|
1512
|
+
fire(event) {
|
|
1513
|
+
this._contributions.onBeforeInteractionEvent();
|
|
1514
|
+
super.fire(event);
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
class EditorContextKeysManager extends Disposable {
|
|
1518
|
+
constructor(editor, contextKeyService) {
|
|
1519
|
+
super();
|
|
1520
|
+
this._editor = editor;
|
|
1521
|
+
contextKeyService.createKey('editorId', editor.getId());
|
|
1522
|
+
this._editorSimpleInput = EditorContextKeys.editorSimpleInput.bindTo(contextKeyService);
|
|
1523
|
+
this._editorFocus = EditorContextKeys.focus.bindTo(contextKeyService);
|
|
1524
|
+
this._textInputFocus = EditorContextKeys.textInputFocus.bindTo(contextKeyService);
|
|
1525
|
+
this._editorTextFocus = EditorContextKeys.editorTextFocus.bindTo(contextKeyService);
|
|
1526
|
+
this._tabMovesFocus = EditorContextKeys.tabMovesFocus.bindTo(contextKeyService);
|
|
1527
|
+
this._editorReadonly = EditorContextKeys.readOnly.bindTo(contextKeyService);
|
|
1528
|
+
this._inDiffEditor = EditorContextKeys.inDiffEditor.bindTo(contextKeyService);
|
|
1529
|
+
this._editorColumnSelection = EditorContextKeys.columnSelection.bindTo(contextKeyService);
|
|
1530
|
+
this._hasMultipleSelections = EditorContextKeys.hasMultipleSelections.bindTo(contextKeyService);
|
|
1531
|
+
this._hasNonEmptySelection = EditorContextKeys.hasNonEmptySelection.bindTo(contextKeyService);
|
|
1532
|
+
this._canUndo = EditorContextKeys.canUndo.bindTo(contextKeyService);
|
|
1533
|
+
this._canRedo = EditorContextKeys.canRedo.bindTo(contextKeyService);
|
|
1534
|
+
this._register(this._editor.onDidChangeConfiguration(() => this._updateFromConfig()));
|
|
1535
|
+
this._register(this._editor.onDidChangeCursorSelection(() => this._updateFromSelection()));
|
|
1536
|
+
this._register(this._editor.onDidFocusEditorWidget(() => this._updateFromFocus()));
|
|
1537
|
+
this._register(this._editor.onDidBlurEditorWidget(() => this._updateFromFocus()));
|
|
1538
|
+
this._register(this._editor.onDidFocusEditorText(() => this._updateFromFocus()));
|
|
1539
|
+
this._register(this._editor.onDidBlurEditorText(() => this._updateFromFocus()));
|
|
1540
|
+
this._register(this._editor.onDidChangeModel(() => this._updateFromModel()));
|
|
1541
|
+
this._register(this._editor.onDidChangeConfiguration(() => this._updateFromModel()));
|
|
1542
|
+
this._register(TabFocus.onDidChangeTabFocus((tabFocusMode) => this._tabMovesFocus.set(tabFocusMode)));
|
|
1543
|
+
this._updateFromConfig();
|
|
1544
|
+
this._updateFromSelection();
|
|
1545
|
+
this._updateFromFocus();
|
|
1546
|
+
this._updateFromModel();
|
|
1547
|
+
this._editorSimpleInput.set(this._editor.isSimpleWidget);
|
|
1548
|
+
}
|
|
1549
|
+
_updateFromConfig() {
|
|
1550
|
+
const options = this._editor.getOptions();
|
|
1551
|
+
this._tabMovesFocus.set(TabFocus.getTabFocusMode());
|
|
1552
|
+
this._editorReadonly.set(options.get(90 ));
|
|
1553
|
+
this._inDiffEditor.set(options.get(61 ));
|
|
1554
|
+
this._editorColumnSelection.set(options.get(22 ));
|
|
1555
|
+
}
|
|
1556
|
+
_updateFromSelection() {
|
|
1557
|
+
const selections = this._editor.getSelections();
|
|
1558
|
+
if (!selections) {
|
|
1559
|
+
this._hasMultipleSelections.reset();
|
|
1560
|
+
this._hasNonEmptySelection.reset();
|
|
1561
|
+
}
|
|
1562
|
+
else {
|
|
1563
|
+
this._hasMultipleSelections.set(selections.length > 1);
|
|
1564
|
+
this._hasNonEmptySelection.set(( selections.some(s => !s.isEmpty())));
|
|
1565
|
+
}
|
|
1566
|
+
}
|
|
1567
|
+
_updateFromFocus() {
|
|
1568
|
+
this._editorFocus.set(this._editor.hasWidgetFocus() && !this._editor.isSimpleWidget);
|
|
1569
|
+
this._editorTextFocus.set(this._editor.hasTextFocus() && !this._editor.isSimpleWidget);
|
|
1570
|
+
this._textInputFocus.set(this._editor.hasTextFocus());
|
|
1571
|
+
}
|
|
1572
|
+
_updateFromModel() {
|
|
1573
|
+
const model = this._editor.getModel();
|
|
1574
|
+
this._canUndo.set(Boolean(model && model.canUndo()));
|
|
1575
|
+
this._canRedo.set(Boolean(model && model.canRedo()));
|
|
1576
|
+
}
|
|
1577
|
+
}
|
|
1578
|
+
class EditorModeContext extends Disposable {
|
|
1579
|
+
constructor(_editor, _contextKeyService, _languageFeaturesService) {
|
|
1580
|
+
super();
|
|
1581
|
+
this._editor = _editor;
|
|
1582
|
+
this._contextKeyService = _contextKeyService;
|
|
1583
|
+
this._languageFeaturesService = _languageFeaturesService;
|
|
1584
|
+
this._langId = EditorContextKeys.languageId.bindTo(_contextKeyService);
|
|
1585
|
+
this._hasCompletionItemProvider = EditorContextKeys.hasCompletionItemProvider.bindTo(_contextKeyService);
|
|
1586
|
+
this._hasCodeActionsProvider = EditorContextKeys.hasCodeActionsProvider.bindTo(_contextKeyService);
|
|
1587
|
+
this._hasCodeLensProvider = EditorContextKeys.hasCodeLensProvider.bindTo(_contextKeyService);
|
|
1588
|
+
this._hasDefinitionProvider = EditorContextKeys.hasDefinitionProvider.bindTo(_contextKeyService);
|
|
1589
|
+
this._hasDeclarationProvider = EditorContextKeys.hasDeclarationProvider.bindTo(_contextKeyService);
|
|
1590
|
+
this._hasImplementationProvider = EditorContextKeys.hasImplementationProvider.bindTo(_contextKeyService);
|
|
1591
|
+
this._hasTypeDefinitionProvider = EditorContextKeys.hasTypeDefinitionProvider.bindTo(_contextKeyService);
|
|
1592
|
+
this._hasHoverProvider = EditorContextKeys.hasHoverProvider.bindTo(_contextKeyService);
|
|
1593
|
+
this._hasDocumentHighlightProvider = EditorContextKeys.hasDocumentHighlightProvider.bindTo(_contextKeyService);
|
|
1594
|
+
this._hasDocumentSymbolProvider = EditorContextKeys.hasDocumentSymbolProvider.bindTo(_contextKeyService);
|
|
1595
|
+
this._hasReferenceProvider = EditorContextKeys.hasReferenceProvider.bindTo(_contextKeyService);
|
|
1596
|
+
this._hasRenameProvider = EditorContextKeys.hasRenameProvider.bindTo(_contextKeyService);
|
|
1597
|
+
this._hasSignatureHelpProvider = EditorContextKeys.hasSignatureHelpProvider.bindTo(_contextKeyService);
|
|
1598
|
+
this._hasInlayHintsProvider = EditorContextKeys.hasInlayHintsProvider.bindTo(_contextKeyService);
|
|
1599
|
+
this._hasDocumentFormattingProvider = EditorContextKeys.hasDocumentFormattingProvider.bindTo(_contextKeyService);
|
|
1600
|
+
this._hasDocumentSelectionFormattingProvider = EditorContextKeys.hasDocumentSelectionFormattingProvider.bindTo(_contextKeyService);
|
|
1601
|
+
this._hasMultipleDocumentFormattingProvider = EditorContextKeys.hasMultipleDocumentFormattingProvider.bindTo(_contextKeyService);
|
|
1602
|
+
this._hasMultipleDocumentSelectionFormattingProvider = EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider.bindTo(_contextKeyService);
|
|
1603
|
+
this._isInWalkThrough = EditorContextKeys.isInWalkThroughSnippet.bindTo(_contextKeyService);
|
|
1604
|
+
const update = () => this._update();
|
|
1605
|
+
this._register(_editor.onDidChangeModel(update));
|
|
1606
|
+
this._register(_editor.onDidChangeModelLanguage(update));
|
|
1607
|
+
this._register(_languageFeaturesService.completionProvider.onDidChange(update));
|
|
1608
|
+
this._register(_languageFeaturesService.codeActionProvider.onDidChange(update));
|
|
1609
|
+
this._register(_languageFeaturesService.codeLensProvider.onDidChange(update));
|
|
1610
|
+
this._register(_languageFeaturesService.definitionProvider.onDidChange(update));
|
|
1611
|
+
this._register(_languageFeaturesService.declarationProvider.onDidChange(update));
|
|
1612
|
+
this._register(_languageFeaturesService.implementationProvider.onDidChange(update));
|
|
1613
|
+
this._register(_languageFeaturesService.typeDefinitionProvider.onDidChange(update));
|
|
1614
|
+
this._register(_languageFeaturesService.hoverProvider.onDidChange(update));
|
|
1615
|
+
this._register(_languageFeaturesService.documentHighlightProvider.onDidChange(update));
|
|
1616
|
+
this._register(_languageFeaturesService.documentSymbolProvider.onDidChange(update));
|
|
1617
|
+
this._register(_languageFeaturesService.referenceProvider.onDidChange(update));
|
|
1618
|
+
this._register(_languageFeaturesService.renameProvider.onDidChange(update));
|
|
1619
|
+
this._register(_languageFeaturesService.documentFormattingEditProvider.onDidChange(update));
|
|
1620
|
+
this._register(_languageFeaturesService.documentRangeFormattingEditProvider.onDidChange(update));
|
|
1621
|
+
this._register(_languageFeaturesService.signatureHelpProvider.onDidChange(update));
|
|
1622
|
+
this._register(_languageFeaturesService.inlayHintsProvider.onDidChange(update));
|
|
1623
|
+
update();
|
|
1624
|
+
}
|
|
1625
|
+
dispose() {
|
|
1626
|
+
super.dispose();
|
|
1627
|
+
}
|
|
1628
|
+
reset() {
|
|
1629
|
+
this._contextKeyService.bufferChangeEvents(() => {
|
|
1630
|
+
this._langId.reset();
|
|
1631
|
+
this._hasCompletionItemProvider.reset();
|
|
1632
|
+
this._hasCodeActionsProvider.reset();
|
|
1633
|
+
this._hasCodeLensProvider.reset();
|
|
1634
|
+
this._hasDefinitionProvider.reset();
|
|
1635
|
+
this._hasDeclarationProvider.reset();
|
|
1636
|
+
this._hasImplementationProvider.reset();
|
|
1637
|
+
this._hasTypeDefinitionProvider.reset();
|
|
1638
|
+
this._hasHoverProvider.reset();
|
|
1639
|
+
this._hasDocumentHighlightProvider.reset();
|
|
1640
|
+
this._hasDocumentSymbolProvider.reset();
|
|
1641
|
+
this._hasReferenceProvider.reset();
|
|
1642
|
+
this._hasRenameProvider.reset();
|
|
1643
|
+
this._hasDocumentFormattingProvider.reset();
|
|
1644
|
+
this._hasDocumentSelectionFormattingProvider.reset();
|
|
1645
|
+
this._hasSignatureHelpProvider.reset();
|
|
1646
|
+
this._isInWalkThrough.reset();
|
|
1647
|
+
});
|
|
1648
|
+
}
|
|
1649
|
+
_update() {
|
|
1650
|
+
const model = this._editor.getModel();
|
|
1651
|
+
if (!model) {
|
|
1652
|
+
this.reset();
|
|
1653
|
+
return;
|
|
1654
|
+
}
|
|
1655
|
+
this._contextKeyService.bufferChangeEvents(() => {
|
|
1656
|
+
this._langId.set(model.getLanguageId());
|
|
1657
|
+
this._hasCompletionItemProvider.set(( this._languageFeaturesService.completionProvider.has(model)));
|
|
1658
|
+
this._hasCodeActionsProvider.set(( this._languageFeaturesService.codeActionProvider.has(model)));
|
|
1659
|
+
this._hasCodeLensProvider.set(( this._languageFeaturesService.codeLensProvider.has(model)));
|
|
1660
|
+
this._hasDefinitionProvider.set(( this._languageFeaturesService.definitionProvider.has(model)));
|
|
1661
|
+
this._hasDeclarationProvider.set(( this._languageFeaturesService.declarationProvider.has(model)));
|
|
1662
|
+
this._hasImplementationProvider.set(( this._languageFeaturesService.implementationProvider.has(model)));
|
|
1663
|
+
this._hasTypeDefinitionProvider.set(( this._languageFeaturesService.typeDefinitionProvider.has(model)));
|
|
1664
|
+
this._hasHoverProvider.set(( this._languageFeaturesService.hoverProvider.has(model)));
|
|
1665
|
+
this._hasDocumentHighlightProvider.set(( this._languageFeaturesService.documentHighlightProvider.has(model)));
|
|
1666
|
+
this._hasDocumentSymbolProvider.set(( this._languageFeaturesService.documentSymbolProvider.has(model)));
|
|
1667
|
+
this._hasReferenceProvider.set(( this._languageFeaturesService.referenceProvider.has(model)));
|
|
1668
|
+
this._hasRenameProvider.set(( this._languageFeaturesService.renameProvider.has(model)));
|
|
1669
|
+
this._hasSignatureHelpProvider.set(( this._languageFeaturesService.signatureHelpProvider.has(model)));
|
|
1670
|
+
this._hasInlayHintsProvider.set(( this._languageFeaturesService.inlayHintsProvider.has(model)));
|
|
1671
|
+
this._hasDocumentFormattingProvider.set(( this._languageFeaturesService.documentFormattingEditProvider.has(model)) || ( this._languageFeaturesService.documentRangeFormattingEditProvider.has(model)));
|
|
1672
|
+
this._hasDocumentSelectionFormattingProvider.set(( this._languageFeaturesService.documentRangeFormattingEditProvider.has(model)));
|
|
1673
|
+
this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(model).length + this._languageFeaturesService.documentRangeFormattingEditProvider.all(model).length > 1);
|
|
1674
|
+
this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(model).length > 1);
|
|
1675
|
+
this._isInWalkThrough.set(model.uri.scheme === Schemas.walkThroughSnippet);
|
|
1676
|
+
});
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1679
|
+
class CodeEditorWidgetFocusTracker extends Disposable {
|
|
1680
|
+
constructor(domElement) {
|
|
1681
|
+
super();
|
|
1682
|
+
this._onChange = this._register(( new Emitter()));
|
|
1683
|
+
this.onChange = this._onChange.event;
|
|
1684
|
+
this._hasFocus = false;
|
|
1685
|
+
this._domFocusTracker = this._register(trackFocus(domElement));
|
|
1686
|
+
this._register(this._domFocusTracker.onDidFocus(() => {
|
|
1687
|
+
this._hasFocus = true;
|
|
1688
|
+
this._onChange.fire(undefined);
|
|
1689
|
+
}));
|
|
1690
|
+
this._register(this._domFocusTracker.onDidBlur(() => {
|
|
1691
|
+
this._hasFocus = false;
|
|
1692
|
+
this._onChange.fire(undefined);
|
|
1693
|
+
}));
|
|
1694
|
+
}
|
|
1695
|
+
hasFocus() {
|
|
1696
|
+
return this._hasFocus;
|
|
1697
|
+
}
|
|
1698
|
+
refreshState() {
|
|
1699
|
+
this._domFocusTracker.refreshState?.();
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1702
|
+
class EditorDecorationsCollection {
|
|
1703
|
+
get length() {
|
|
1704
|
+
return this._decorationIds.length;
|
|
1705
|
+
}
|
|
1706
|
+
constructor(_editor, decorations) {
|
|
1707
|
+
this._editor = _editor;
|
|
1708
|
+
this._decorationIds = [];
|
|
1709
|
+
this._isChangingDecorations = false;
|
|
1710
|
+
if (Array.isArray(decorations) && decorations.length > 0) {
|
|
1711
|
+
this.set(decorations);
|
|
1712
|
+
}
|
|
1713
|
+
}
|
|
1714
|
+
onDidChange(listener, thisArgs, disposables) {
|
|
1715
|
+
return this._editor.onDidChangeModelDecorations((e) => {
|
|
1716
|
+
if (this._isChangingDecorations) {
|
|
1717
|
+
return;
|
|
1718
|
+
}
|
|
1719
|
+
listener.call(thisArgs, e);
|
|
1720
|
+
}, disposables);
|
|
1721
|
+
}
|
|
1722
|
+
getRange(index) {
|
|
1723
|
+
if (!this._editor.hasModel()) {
|
|
1724
|
+
return null;
|
|
1725
|
+
}
|
|
1726
|
+
if (index >= this._decorationIds.length) {
|
|
1727
|
+
return null;
|
|
1728
|
+
}
|
|
1729
|
+
return this._editor.getModel().getDecorationRange(this._decorationIds[index]);
|
|
1730
|
+
}
|
|
1731
|
+
getRanges() {
|
|
1732
|
+
if (!this._editor.hasModel()) {
|
|
1733
|
+
return [];
|
|
1734
|
+
}
|
|
1735
|
+
const model = this._editor.getModel();
|
|
1736
|
+
const result = [];
|
|
1737
|
+
for (const decorationId of this._decorationIds) {
|
|
1738
|
+
const range = model.getDecorationRange(decorationId);
|
|
1739
|
+
if (range) {
|
|
1740
|
+
result.push(range);
|
|
1741
|
+
}
|
|
1742
|
+
}
|
|
1743
|
+
return result;
|
|
1744
|
+
}
|
|
1745
|
+
has(decoration) {
|
|
1746
|
+
return this._decorationIds.includes(decoration.id);
|
|
1747
|
+
}
|
|
1748
|
+
clear() {
|
|
1749
|
+
if (this._decorationIds.length === 0) {
|
|
1750
|
+
return;
|
|
1751
|
+
}
|
|
1752
|
+
this.set([]);
|
|
1753
|
+
}
|
|
1754
|
+
set(newDecorations) {
|
|
1755
|
+
try {
|
|
1756
|
+
this._isChangingDecorations = true;
|
|
1757
|
+
this._editor.changeDecorations((accessor) => {
|
|
1758
|
+
this._decorationIds = accessor.deltaDecorations(this._decorationIds, newDecorations);
|
|
1759
|
+
});
|
|
1760
|
+
}
|
|
1761
|
+
finally {
|
|
1762
|
+
this._isChangingDecorations = false;
|
|
1763
|
+
}
|
|
1764
|
+
return this._decorationIds;
|
|
1765
|
+
}
|
|
1766
|
+
append(newDecorations) {
|
|
1767
|
+
let newDecorationIds = [];
|
|
1768
|
+
try {
|
|
1769
|
+
this._isChangingDecorations = true;
|
|
1770
|
+
this._editor.changeDecorations((accessor) => {
|
|
1771
|
+
newDecorationIds = accessor.deltaDecorations([], newDecorations);
|
|
1772
|
+
this._decorationIds = this._decorationIds.concat(newDecorationIds);
|
|
1773
|
+
});
|
|
1774
|
+
}
|
|
1775
|
+
finally {
|
|
1776
|
+
this._isChangingDecorations = false;
|
|
1777
|
+
}
|
|
1778
|
+
return newDecorationIds;
|
|
1779
|
+
}
|
|
1780
|
+
}
|
|
1781
|
+
const squigglyStart = encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 3' enable-background='new 0 0 6 3' height='3' width='6'><g fill='`);
|
|
1782
|
+
const squigglyEnd = encodeURIComponent(`'><polygon points='5.5,0 2.5,3 1.1,3 4.1,0'/><polygon points='4,0 6,2 6,0.6 5.4,0'/><polygon points='0,2 1,3 2.4,3 0,0.6'/></g></svg>`);
|
|
1783
|
+
function getSquigglySVGData(color) {
|
|
1784
|
+
return squigglyStart + encodeURIComponent(( color.toString())) + squigglyEnd;
|
|
1785
|
+
}
|
|
1786
|
+
const dotdotdotStart = encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="`);
|
|
1787
|
+
const dotdotdotEnd = encodeURIComponent(`"><circle cx="1" cy="1" r="1"/><circle cx="5" cy="1" r="1"/><circle cx="9" cy="1" r="1"/></g></svg>`);
|
|
1788
|
+
function getDotDotDotSVGData(color) {
|
|
1789
|
+
return dotdotdotStart + encodeURIComponent(( color.toString())) + dotdotdotEnd;
|
|
1790
|
+
}
|
|
1791
|
+
registerThemingParticipant((theme, collector) => {
|
|
1792
|
+
const errorForeground = theme.getColor(editorErrorForeground);
|
|
1793
|
+
if (errorForeground) {
|
|
1794
|
+
collector.addRule(`.monaco-editor .${"squiggly-error" } { background: url("data:image/svg+xml,${getSquigglySVGData(errorForeground)}") repeat-x bottom left; }`);
|
|
1795
|
+
}
|
|
1796
|
+
const warningForeground = theme.getColor(editorWarningForeground);
|
|
1797
|
+
if (warningForeground) {
|
|
1798
|
+
collector.addRule(`.monaco-editor .${"squiggly-warning" } { background: url("data:image/svg+xml,${getSquigglySVGData(warningForeground)}") repeat-x bottom left; }`);
|
|
1799
|
+
}
|
|
1800
|
+
const infoForeground = theme.getColor(editorInfoForeground);
|
|
1801
|
+
if (infoForeground) {
|
|
1802
|
+
collector.addRule(`.monaco-editor .${"squiggly-info" } { background: url("data:image/svg+xml,${getSquigglySVGData(infoForeground)}") repeat-x bottom left; }`);
|
|
1803
|
+
}
|
|
1804
|
+
const hintForeground = theme.getColor(editorHintForeground);
|
|
1805
|
+
if (hintForeground) {
|
|
1806
|
+
collector.addRule(`.monaco-editor .${"squiggly-hint" } { background: url("data:image/svg+xml,${getDotDotDotSVGData(hintForeground)}") no-repeat bottom left; }`);
|
|
1807
|
+
}
|
|
1808
|
+
const unnecessaryForeground = theme.getColor(editorUnnecessaryCodeOpacity);
|
|
1809
|
+
if (unnecessaryForeground) {
|
|
1810
|
+
collector.addRule(`.monaco-editor.showUnused .${"squiggly-inline-unnecessary" } { opacity: ${unnecessaryForeground.rgba.a}; }`);
|
|
1811
|
+
}
|
|
1812
|
+
});
|
|
1813
|
+
export { BooleanEventEmitter, CodeEditorWidget, EditorModeContext };
|