monaco-editor-core 0.57.0 → 0.58.0-dev-20261104
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/esm/nls.keys.json +1 -1
- package/esm/nls.messages.cs.js +2 -2
- package/esm/nls.messages.de.js +2 -2
- package/esm/nls.messages.es.js +2 -2
- package/esm/nls.messages.fr.js +2 -2
- package/esm/nls.messages.it.js +2 -2
- package/esm/nls.messages.ja.js +2 -2
- package/esm/nls.messages.js +1 -1
- package/esm/nls.messages.json +1 -1
- package/esm/nls.messages.ko.js +2 -2
- package/esm/nls.messages.pl.js +2 -2
- package/esm/nls.messages.pt-br.js +2 -2
- package/esm/nls.messages.ru.js +2 -2
- package/esm/nls.messages.tr.js +2 -2
- package/esm/nls.messages.zh-cn.js +2 -2
- package/esm/nls.messages.zh-tw.js +2 -2
- package/esm/nls.metadata.json +38 -6
- package/esm/vs/base/browser/browser.js +8 -0
- package/esm/vs/base/browser/browser.js.map +1 -1
- package/esm/vs/base/browser/contextmenu.js +8 -1
- package/esm/vs/base/browser/contextmenu.js.map +1 -1
- package/esm/vs/base/browser/dom.js +34 -5
- package/esm/vs/base/browser/dom.js.map +1 -1
- package/esm/vs/base/browser/dompurify/dompurify.js +2457 -2640
- package/esm/vs/base/browser/markdownRenderer.js +48 -21
- package/esm/vs/base/browser/markdownRenderer.js.map +1 -1
- package/esm/vs/base/browser/pixelRatio.js +3 -2
- package/esm/vs/base/browser/pixelRatio.js.map +1 -1
- package/esm/vs/base/browser/ui/actionbar/actionViewItems.js +5 -2
- package/esm/vs/base/browser/ui/actionbar/actionViewItems.js.map +1 -1
- package/esm/vs/base/browser/ui/actionbar/actionbar.js +7 -2
- package/esm/vs/base/browser/ui/actionbar/actionbar.js.map +1 -1
- package/esm/vs/base/browser/ui/animations/animations.js +68 -40
- package/esm/vs/base/browser/ui/animations/animations.js.map +1 -1
- package/esm/vs/base/browser/ui/button/button.js +7 -0
- package/esm/vs/base/browser/ui/button/button.js.map +1 -1
- package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/esm/vs/base/browser/ui/contextview/contextview.css +15 -0
- package/esm/vs/base/browser/ui/contextview/contextview.js +266 -40
- package/esm/vs/base/browser/ui/contextview/contextview.js.map +1 -1
- package/esm/vs/base/browser/ui/contextview/windowControlsOverlay.js +72 -0
- package/esm/vs/base/browser/ui/contextview/windowControlsOverlay.js.map +1 -0
- package/esm/vs/base/browser/ui/dialog/dialog.css +5 -0
- package/esm/vs/base/browser/ui/dropdown/dropdown.js +2 -1
- package/esm/vs/base/browser/ui/dropdown/dropdown.js.map +1 -1
- package/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js +1 -0
- package/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js.map +1 -1
- package/esm/vs/base/browser/ui/hover/hover.js.map +1 -1
- package/esm/vs/base/browser/ui/list/listView.js +87 -15
- package/esm/vs/base/browser/ui/list/listView.js.map +1 -1
- package/esm/vs/base/browser/ui/list/listWidget.js +37 -15
- package/esm/vs/base/browser/ui/list/listWidget.js.map +1 -1
- package/esm/vs/base/browser/ui/menu/menu.js +189 -52
- package/esm/vs/base/browser/ui/menu/menu.js.map +1 -1
- package/esm/vs/base/browser/ui/radio/radio.css +11 -0
- package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js +2 -1
- package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js.map +1 -1
- package/esm/vs/base/browser/ui/selectBox/selectBox.js.map +1 -1
- package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js +14 -8
- package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js.map +1 -1
- package/esm/vs/base/browser/ui/splitview/splitview.js +11 -7
- package/esm/vs/base/browser/ui/splitview/splitview.js.map +1 -1
- package/esm/vs/base/browser/ui/toggle/switch.css +16 -7
- package/esm/vs/base/browser/ui/toggle/switch.js +9 -6
- package/esm/vs/base/browser/ui/toggle/switch.js.map +1 -1
- package/esm/vs/base/browser/ui/toolbar/toolbar.css +1 -2
- package/esm/vs/base/browser/ui/toolbar/toolbar.js +85 -38
- package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/abstractTree.js +48 -9
- package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/asyncDataTree.js +10 -1
- package/esm/vs/base/browser/ui/tree/asyncDataTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/objectTree.js +3 -0
- package/esm/vs/base/browser/ui/tree/objectTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/tree.js.map +1 -1
- package/esm/vs/base/common/actions.js +8 -2
- package/esm/vs/base/common/actions.js.map +1 -1
- package/esm/vs/base/common/arrays.js +4 -4
- package/esm/vs/base/common/arrays.js.map +1 -1
- package/esm/vs/base/common/async.js +12 -8
- package/esm/vs/base/common/async.js.map +1 -1
- package/esm/vs/base/common/cancellation.js +25 -0
- package/esm/vs/base/common/cancellation.js.map +1 -1
- package/esm/vs/base/common/codicons.js +2 -0
- package/esm/vs/base/common/codicons.js.map +1 -1
- package/esm/vs/base/common/codiconsLibrary.js +2 -0
- package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
- package/esm/vs/base/common/color.js +1 -1
- package/esm/vs/base/common/color.js.map +1 -1
- package/esm/vs/base/common/diff/diff.js +60 -1
- package/esm/vs/base/common/diff/diff.js.map +1 -1
- package/esm/vs/base/common/event.js +1 -1
- package/esm/vs/base/common/event.js.map +1 -1
- package/esm/vs/base/common/glob.js +1 -0
- package/esm/vs/base/common/glob.js.map +1 -1
- package/esm/vs/base/common/htmlContent.js +74 -12
- package/esm/vs/base/common/htmlContent.js.map +1 -1
- package/esm/vs/base/common/json.js +19 -0
- package/esm/vs/base/common/json.js.map +1 -0
- package/esm/vs/base/common/network.js +16 -0
- package/esm/vs/base/common/network.js.map +1 -1
- package/esm/vs/base/common/resources.js +14 -2
- package/esm/vs/base/common/resources.js.map +1 -1
- package/esm/vs/base/common/strings.js +1 -1
- package/esm/vs/base/common/strings.js.map +1 -1
- package/esm/vs/base/common/uri.js +2 -2
- package/esm/vs/base/common/uri.js.map +1 -1
- package/esm/vs/editor/browser/config/editorConfiguration.js +1 -1
- package/esm/vs/editor/browser/config/fontMeasurements.js +19 -6
- package/esm/vs/editor/browser/config/fontMeasurements.js.map +1 -1
- package/esm/vs/editor/browser/controller/dragScrolling.js +3 -3
- package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js +11 -5
- package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +8 -38
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/native/screenReaderContentRich.js +3 -3
- package/esm/vs/editor/browser/controller/editContext/native/screenReaderSupport.js +6 -6
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js +12 -10
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js.map +1 -1
- package/esm/vs/editor/browser/controller/mouseHandler.js +7 -7
- package/esm/vs/editor/browser/controller/mouseTarget.js +3 -3
- package/esm/vs/editor/browser/coreCommands.js +2 -2
- package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
- package/esm/vs/editor/browser/editorMarkdownSanitizer.js +19 -0
- package/esm/vs/editor/browser/editorMarkdownSanitizer.js.map +1 -0
- package/esm/vs/editor/browser/gpu/rectangleRenderer.js +1 -1
- package/esm/vs/editor/browser/gpu/viewGpuContext.js +1 -1
- package/esm/vs/editor/browser/observableCodeEditor.js +1 -1
- package/esm/vs/editor/browser/services/editorWorkerService.js +3 -2
- package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
- package/esm/vs/editor/browser/services/openerService.js +6 -2
- package/esm/vs/editor/browser/services/openerService.js.map +1 -1
- package/esm/vs/editor/browser/view/domLineBreaksComputer.js +34 -11
- package/esm/vs/editor/browser/view/domLineBreaksComputer.js.map +1 -1
- package/esm/vs/editor/browser/view/viewController.js +7 -7
- package/esm/vs/editor/browser/view/viewController.js.map +1 -1
- package/esm/vs/editor/browser/view/viewLayer.js +1 -1
- package/esm/vs/editor/browser/view/viewOverlays.js +4 -4
- package/esm/vs/editor/browser/view.js +5 -5
- package/esm/vs/editor/browser/viewParts/blockDecorations/blockDecorations.js +1 -1
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +11 -3
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js +6 -6
- package/esm/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.js +12 -12
- package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +9 -2
- package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.js +2 -2
- package/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.js +2 -2
- package/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.js +2 -2
- package/esm/vs/editor/browser/viewParts/margin/margin.js +2 -2
- package/esm/vs/editor/browser/viewParts/minimap/minimap.js +6 -6
- package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js +9 -2
- package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.js +5 -5
- package/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js +3 -3
- package/esm/vs/editor/browser/viewParts/rulers/rulers.js +2 -2
- package/esm/vs/editor/browser/viewParts/rulersGpu/rulersGpu.js +1 -1
- package/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js +3 -3
- package/esm/vs/editor/browser/viewParts/selections/selections.js +2 -2
- package/esm/vs/editor/browser/viewParts/viewCursors/viewCursor.js +2 -2
- package/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.js +6 -6
- package/esm/vs/editor/browser/viewParts/viewLines/viewLineOptions.js +5 -5
- package/esm/vs/editor/browser/viewParts/viewLines/viewLines.js +11 -11
- package/esm/vs/editor/browser/viewParts/viewLinesGpu/viewLinesGpu.js +1 -1
- package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js +2 -2
- package/esm/vs/editor/browser/viewParts/whitespace/whitespace.js +4 -4
- package/esm/vs/editor/browser/viewParts/wordWrapIndicator/wordWrapIndicator.js +2 -2
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +22 -21
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/commands.js +12 -12
- package/esm/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer.js +18 -18
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.js +3 -3
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js +10 -10
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/renderLines.js +2 -2
- package/esm/vs/editor/browser/widget/diffEditor/diffEditor.contribution.js +4 -4
- package/esm/vs/editor/browser/widget/diffEditor/diffProviderFactoryService.js +21 -3
- package/esm/vs/editor/browser/widget/diffEditor/diffProviderFactoryService.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/features/gutterFeature.js +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +10 -10
- package/esm/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +2 -2
- package/esm/vs/editor/browser/widget/diffEditor/features/overviewRulerFeature.js +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/features/revertButtonsFeature.js +2 -2
- package/esm/vs/editor/browser/widget/diffEditor/registrations.contribution.js +5 -5
- package/esm/vs/editor/browser/widget/multiDiffEditor/colors.js +3 -3
- package/esm/vs/editor/browser/widget/multiDiffEditor/compressedVirtualizedScrollLayout.js +2 -2
- package/esm/vs/editor/browser/widget/multiDiffEditor/compressedVirtualizedScrollLayout.js.map +1 -1
- package/esm/vs/editor/browser/widget/multiDiffEditor/compressedVirtualizedScrollView.js +21 -2
- package/esm/vs/editor/browser/widget/multiDiffEditor/compressedVirtualizedScrollView.js.map +1 -1
- package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js +2 -2
- package/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js +11 -3
- package/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js.map +1 -1
- package/esm/vs/editor/browser/widget/multiDiffEditor/virtualizedItemManager.js +1 -0
- package/esm/vs/editor/browser/widget/multiDiffEditor/virtualizedItemManager.js.map +1 -1
- package/esm/vs/editor/common/commands/columnSelectionPasteCommand.js +64 -0
- package/esm/vs/editor/common/commands/columnSelectionPasteCommand.js.map +1 -0
- package/esm/vs/editor/common/config/editorConfigurationSchema.js +68 -58
- package/esm/vs/editor/common/config/editorConfigurationSchema.js.map +1 -1
- package/esm/vs/editor/common/config/editorOptions.js +560 -500
- package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
- package/esm/vs/editor/common/core/editorColorRegistry.js +71 -71
- package/esm/vs/editor/common/core/edits/textEdit.js +16 -0
- package/esm/vs/editor/common/core/edits/textEdit.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursor.js +20 -10
- package/esm/vs/editor/common/cursor/cursor.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursorTypeEditOperations.js +67 -14
- package/esm/vs/editor/common/cursor/cursorTypeEditOperations.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursorTypeOperations.js +2 -2
- package/esm/vs/editor/common/cursor/cursorTypeOperations.js.map +1 -1
- package/esm/vs/editor/common/cursorCommon.js +22 -21
- package/esm/vs/editor/common/cursorCommon.js.map +1 -1
- package/esm/vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer.js +21 -8
- package/esm/vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer.js.map +1 -1
- package/esm/vs/editor/common/diff/documentDiffProvider.js.map +1 -1
- package/esm/vs/editor/common/diff/externalLinesDiffComputer.js +38 -26
- package/esm/vs/editor/common/diff/externalLinesDiffComputer.js.map +1 -1
- package/esm/vs/editor/common/diff/rangeMapping.js +11 -1
- package/esm/vs/editor/common/diff/rangeMapping.js.map +1 -1
- package/esm/vs/editor/common/diff/verifyLinesDiff.js +28 -0
- package/esm/vs/editor/common/diff/verifyLinesDiff.js.map +1 -0
- package/esm/vs/editor/common/editorContextKeys.js +53 -53
- package/esm/vs/editor/common/languages/languageConfiguration.js +8 -0
- package/esm/vs/editor/common/languages/languageConfiguration.js.map +1 -1
- package/esm/vs/editor/common/languages/modesRegistry.js +1 -1
- package/esm/vs/editor/common/languages.js +56 -56
- package/esm/vs/editor/common/model/editStack.js +1 -1
- package/esm/vs/editor/common/services/editorWebWorker.js +27 -6
- package/esm/vs/editor/common/services/editorWebWorker.js.map +1 -1
- package/esm/vs/editor/common/services/editorWorker.js.map +1 -1
- package/esm/vs/editor/common/services/languageService.js +6 -4
- package/esm/vs/editor/common/services/languageService.js.map +1 -1
- package/esm/vs/editor/common/services/markerDecorationsService.js +21 -2
- package/esm/vs/editor/common/services/markerDecorationsService.js.map +1 -1
- package/esm/vs/editor/common/standalone/standaloneEnums.js +100 -97
- package/esm/vs/editor/common/standalone/standaloneEnums.js.map +1 -1
- package/esm/vs/editor/common/standaloneStrings.js +11 -11
- package/esm/vs/editor/common/textModelEditSource.js +9 -0
- package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
- package/esm/vs/editor/common/viewLayout/viewLayout.js +16 -16
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
- package/esm/vs/editor/common/viewModel/monospaceLineBreaksComputer.js +1 -1
- package/esm/vs/editor/common/viewModel/viewModelImpl.js +19 -19
- package/esm/vs/editor/common/viewModel/viewModelImpl.js.map +1 -1
- package/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
- package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +9 -9
- package/esm/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
- package/esm/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
- package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +23 -20
- package/esm/vs/editor/contrib/clipboard/browser/clipboard.js.map +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
- package/esm/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
- package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
- package/esm/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
- package/esm/vs/editor/contrib/codeAction/browser/codeActionModel.js +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
- package/esm/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
- package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js +25 -10
- package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js.map +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerContribution.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +3 -3
- package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
- package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerParticipant.js +1 -1
- package/esm/vs/editor/contrib/comment/browser/comment.js +6 -6
- package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +17 -17
- package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js.map +1 -1
- package/esm/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +4 -4
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +39 -39
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js.map +1 -1
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/pasteEditSession.js +19 -0
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/pasteEditSession.js.map +1 -0
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +26 -18
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js.map +1 -1
- package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
- package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js.map +1 -1
- package/esm/vs/editor/contrib/find/browser/findController.js +18 -18
- package/esm/vs/editor/contrib/find/browser/findController.js.map +1 -1
- package/esm/vs/editor/contrib/find/browser/findModel.js +6 -6
- package/esm/vs/editor/contrib/find/browser/findWidget.js +40 -40
- package/esm/vs/editor/contrib/find/browser/findWidget.js.map +1 -1
- package/esm/vs/editor/contrib/folding/browser/folding.js +23 -23
- package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
- package/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
- package/esm/vs/editor/contrib/format/browser/formatActions.js +2 -2
- package/esm/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
- package/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
- package/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +2 -2
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +4 -4
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js.map +1 -1
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
- package/esm/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
- package/esm/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
- package/esm/vs/editor/contrib/hover/browser/contentHoverController.js +9 -3
- package/esm/vs/editor/contrib/hover/browser/contentHoverController.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/glyphHoverController.js +2 -2
- package/esm/vs/editor/contrib/hover/browser/glyphHoverWidget.js +2 -1
- package/esm/vs/editor/contrib/hover/browser/glyphHoverWidget.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
- package/esm/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
- package/esm/vs/editor/contrib/hover/browser/hoverCopyButton.js +2 -2
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +10 -8
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +6 -6
- package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
- package/esm/vs/editor/contrib/indentation/browser/indentation.js +20 -20
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +5 -5
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +9 -9
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsLocations.js +3 -3
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsLocations.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +21 -21
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +13 -13
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +7 -7
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +6 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js +2 -2
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +7 -7
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +6 -6
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js +3 -3
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -20
- package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
- package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
- package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +32 -32
- package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +5 -4
- package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js.map +1 -1
- package/esm/vs/editor/contrib/links/browser/links.js +16 -15
- package/esm/vs/editor/contrib/links/browser/links.js.map +1 -1
- package/esm/vs/editor/contrib/longLinesHelper/browser/longLinesHelper.js +1 -1
- package/esm/vs/editor/contrib/message/browser/messageController.js +16 -12
- package/esm/vs/editor/contrib/message/browser/messageController.js.map +1 -1
- package/esm/vs/editor/contrib/middleScroll/browser/middleScrollController.js +1 -1
- package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +91 -55
- package/esm/vs/editor/contrib/multicursor/browser/multicursor.js.map +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsModel.js +3 -3
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsModel.js.map +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +6 -4
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js.map +1 -1
- package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
- package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
- package/esm/vs/editor/contrib/placeholderText/browser/placeholderTextContribution.js +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +12 -12
- package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
- package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +3 -3
- package/esm/vs/editor/contrib/rename/browser/rename.js +11 -11
- package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
- package/esm/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js +6 -6
- package/esm/vs/editor/contrib/semanticTokens/browser/documentSemanticTokens.js +23 -13
- package/esm/vs/editor/contrib/semanticTokens/browser/documentSemanticTokens.js.map +1 -1
- package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +5 -5
- package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +5 -5
- package/esm/vs/editor/contrib/snippet/browser/snippetSession.js +2 -2
- package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +10 -8
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js.map +1 -1
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollModelProvider.js +1 -1
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollProvider.js +2 -2
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +6 -6
- package/esm/vs/editor/contrib/suggest/browser/suggest.js +9 -9
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js +15 -15
- package/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/suggestModel.js +11 -11
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +27 -27
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +8 -6
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +5 -5
- package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +3 -3
- package/esm/vs/editor/contrib/suggest/browser/wordDistance.js +1 -1
- package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
- package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
- package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +27 -27
- package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +9 -9
- package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
- package/esm/vs/editor/contrib/wordHighlighter/browser/textualHighlightProvider.js +1 -1
- package/esm/vs/editor/contrib/wordHighlighter/browser/textualHighlightProvider.js.map +1 -1
- package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +50 -14
- package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js.map +1 -1
- package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +6 -6
- package/esm/vs/editor/editor.api.d.ts +133 -98
- package/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js +1 -1
- package/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.js +5 -3
- package/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneCodeEditor.js +15 -1
- package/esm/vs/editor/standalone/browser/standaloneCodeEditor.js.map +1 -1
- package/esm/vs/nls.js.map +1 -1
- package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +72 -66
- package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js.map +1 -1
- package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
- package/esm/vs/platform/actionWidget/browser/actionList.js +434 -136
- package/esm/vs/platform/actionWidget/browser/actionList.js.map +1 -1
- package/esm/vs/platform/actionWidget/browser/actionWidget.css +74 -4
- package/esm/vs/platform/actionWidget/browser/actionWidget.js +24 -26
- package/esm/vs/platform/actionWidget/browser/actionWidget.js.map +1 -1
- package/esm/vs/platform/actionWidget/browser/actionWidgetMotion.js +16 -0
- package/esm/vs/platform/actionWidget/browser/actionWidgetMotion.js.map +1 -0
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +15 -17
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js.map +1 -1
- package/esm/vs/platform/actions/browser/toolbar.js +25 -12
- package/esm/vs/platform/actions/browser/toolbar.js.map +1 -1
- package/esm/vs/platform/actions/common/actions.js +4 -2
- package/esm/vs/platform/actions/common/actions.js.map +1 -1
- package/esm/vs/platform/actions/common/menuService.js +15 -8
- package/esm/vs/platform/actions/common/menuService.js.map +1 -1
- package/esm/vs/platform/configuration/common/configuration.js +3 -1
- package/esm/vs/platform/configuration/common/configuration.js.map +1 -1
- package/esm/vs/platform/configuration/common/configurationModels.js +16 -11
- package/esm/vs/platform/configuration/common/configurationModels.js.map +1 -1
- package/esm/vs/platform/configuration/common/configurationRegistry.js +29 -27
- package/esm/vs/platform/configuration/common/configurationRegistry.js.map +1 -1
- package/esm/vs/platform/configuration/common/configurations.js +13 -1
- package/esm/vs/platform/configuration/common/configurations.js.map +1 -1
- package/esm/vs/platform/contextkey/browser/contextKeyService.js +2 -2
- package/esm/vs/platform/contextkey/browser/contextKeyService.js.map +1 -1
- package/esm/vs/platform/contextkey/common/contextkey.js +28 -14
- package/esm/vs/platform/contextkey/common/contextkey.js.map +1 -1
- package/esm/vs/platform/contextkey/common/contextkeys.js +10 -10
- package/esm/vs/platform/contextkey/common/scanner.js +5 -5
- package/esm/vs/platform/contextview/browser/contextMenuHandler.js +17 -4
- package/esm/vs/platform/contextview/browser/contextMenuHandler.js.map +1 -1
- package/esm/vs/platform/contextview/browser/contextMenuService.js +1 -1
- package/esm/vs/platform/contextview/browser/contextMenuService.js.map +1 -1
- package/esm/vs/platform/contextview/browser/contextView.js.map +1 -1
- package/esm/vs/platform/contextview/browser/contextViewService.js +7 -2
- package/esm/vs/platform/contextview/browser/contextViewService.js.map +1 -1
- package/esm/vs/platform/editor/common/editor.js +17 -0
- package/esm/vs/platform/editor/common/editor.js.map +1 -1
- package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
- package/esm/vs/platform/hover/browser/hoverService.js +6 -3
- package/esm/vs/platform/hover/browser/hoverService.js.map +1 -1
- package/esm/vs/platform/hover/browser/hoverWidget.js +38 -6
- package/esm/vs/platform/hover/browser/hoverWidget.js.map +1 -1
- package/esm/vs/platform/hover/browser/updatableHoverWidget.js +32 -5
- package/esm/vs/platform/hover/browser/updatableHoverWidget.js.map +1 -1
- package/esm/vs/platform/instantiation/common/instantiationService.js +1 -1
- package/esm/vs/platform/instantiation/common/instantiationService.js.map +1 -1
- package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +5 -5
- package/esm/vs/platform/keybinding/common/keybindingResolver.js +1 -1
- package/esm/vs/platform/keybinding/common/keybindingResolver.js.map +1 -1
- package/esm/vs/platform/list/browser/listService.js +27 -27
- package/esm/vs/platform/markers/common/markerService.js +11 -8
- package/esm/vs/platform/markers/common/markerService.js.map +1 -1
- package/esm/vs/platform/markers/common/markers.js +6 -6
- package/esm/vs/platform/markers/common/markers.js.map +1 -1
- package/esm/vs/platform/notification/common/notification.js.map +1 -1
- package/esm/vs/platform/notification/common/notificationMessage.js +37 -0
- package/esm/vs/platform/notification/common/notificationMessage.js.map +1 -0
- package/esm/vs/platform/opener/common/opener.js.map +1 -1
- package/esm/vs/platform/progress/common/progress.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +8 -8
- package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
- package/esm/vs/platform/quickinput/browser/media/quickInput.css +33 -2
- package/esm/vs/platform/quickinput/browser/quickAccess.js +7 -4
- package/esm/vs/platform/quickinput/browser/quickAccess.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInput.js +10 -10
- package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
- package/esm/vs/platform/quickinput/browser/quickInputController.js +65 -15
- package/esm/vs/platform/quickinput/browser/quickInputController.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputList.js +96 -90
- package/esm/vs/platform/quickinput/browser/quickInputList.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputService.js +5 -7
- package/esm/vs/platform/quickinput/browser/quickInputService.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickTree.js +1 -1
- package/esm/vs/platform/quickinput/common/quickAccess.js.map +1 -1
- package/esm/vs/platform/quickinput/common/quickInput.js.map +1 -1
- package/esm/vs/platform/storage/common/storage.js.map +1 -1
- package/esm/vs/platform/theme/common/colorRegistry.js +1 -0
- package/esm/vs/platform/theme/common/colorRegistry.js.map +1 -1
- package/esm/vs/platform/theme/common/colorUtils.js +11 -3
- package/esm/vs/platform/theme/common/colorUtils.js.map +1 -1
- package/esm/vs/platform/theme/common/colors/baseColors.js +19 -19
- package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -9
- package/esm/vs/platform/theme/common/colors/chartsColors.js.map +1 -1
- package/esm/vs/platform/theme/common/colors/confettiColors.js +14 -0
- package/esm/vs/platform/theme/common/colors/confettiColors.js.map +1 -0
- package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
- package/esm/vs/platform/theme/common/colors/inputColors.js +48 -48
- package/esm/vs/platform/theme/common/colors/inputColors.js.map +1 -1
- package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
- package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
- package/esm/vs/platform/theme/common/colors/minimapColors.js +13 -13
- package/esm/vs/platform/theme/common/colors/minimapColors.js.map +1 -1
- package/esm/vs/platform/theme/common/colors/miscColors.js +16 -16
- package/esm/vs/platform/theme/common/colors/quickpickColors.js +10 -10
- package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
- package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
- package/esm/vs/platform/undoRedo/common/undoRedoService.js +20 -20
- package/esm/vs/platform/workspace/common/workspace.js +1 -1
- package/monaco.d.ts +133 -98
- package/package.json +3 -3
- package/version.txt +1 -1
|
@@ -108,7 +108,7 @@ let ContextMenuController = class ContextMenuController {
|
|
|
108
108
|
this._editor.setPosition(e.target.position);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
// Unless the user
|
|
111
|
+
// Unless the user triggered the context menu through Shift+F10, use the mouse position as menu position
|
|
112
112
|
let anchor = null;
|
|
113
113
|
if (e.target.type !== 1 /* MouseTargetType.TEXTAREA */) {
|
|
114
114
|
anchor = e.event;
|
|
@@ -176,7 +176,7 @@ let ContextMenuController = class ContextMenuController {
|
|
|
176
176
|
const posy = editorCoords.top + cursorCoords.top + cursorCoords.height;
|
|
177
177
|
anchor = { x: posx, y: posy };
|
|
178
178
|
}
|
|
179
|
-
const useShadowDOM = this._editor.getOption(
|
|
179
|
+
const useShadowDOM = this._editor.getOption(147 /* EditorOption.useShadowDOM */) && !isIOS; // Do not use shadow dom on IOS #122035
|
|
180
180
|
// Show menu
|
|
181
181
|
this._contextMenuIsBeingShownCount++;
|
|
182
182
|
this._contextMenuService.showContextMenu({
|
|
@@ -211,7 +211,7 @@ let ContextMenuController = class ContextMenuController {
|
|
|
211
211
|
// can't update the configuration properly in the standalone editor
|
|
212
212
|
return;
|
|
213
213
|
}
|
|
214
|
-
const minimapOptions = this._editor.getOption(
|
|
214
|
+
const minimapOptions = this._editor.getOption(82 /* EditorOption.minimap */);
|
|
215
215
|
let lastId = 0;
|
|
216
216
|
const createAction = (opts) => {
|
|
217
217
|
return {
|
|
@@ -248,7 +248,7 @@ let ContextMenuController = class ContextMenuController {
|
|
|
248
248
|
};
|
|
249
249
|
const actions = [];
|
|
250
250
|
actions.push(createAction({
|
|
251
|
-
label: nls.localize(
|
|
251
|
+
label: nls.localize(959, "Minimap"),
|
|
252
252
|
checked: minimapOptions.enabled,
|
|
253
253
|
run: () => {
|
|
254
254
|
this._configurationService.updateValue(`editor.minimap.enabled`, !minimapOptions.enabled);
|
|
@@ -256,38 +256,38 @@ let ContextMenuController = class ContextMenuController {
|
|
|
256
256
|
}));
|
|
257
257
|
actions.push(new Separator());
|
|
258
258
|
actions.push(createAction({
|
|
259
|
-
label: nls.localize(
|
|
259
|
+
label: nls.localize(960, "Render Characters"),
|
|
260
260
|
enabled: minimapOptions.enabled,
|
|
261
261
|
checked: minimapOptions.renderCharacters,
|
|
262
262
|
run: () => {
|
|
263
263
|
this._configurationService.updateValue(`editor.minimap.renderCharacters`, !minimapOptions.renderCharacters);
|
|
264
264
|
}
|
|
265
265
|
}));
|
|
266
|
-
actions.push(createEnumAction(nls.localize(
|
|
267
|
-
label: nls.localize(
|
|
266
|
+
actions.push(createEnumAction(nls.localize(961, "Vertical size"), minimapOptions.enabled, 'editor.minimap.size', minimapOptions.size, [{
|
|
267
|
+
label: nls.localize(962, "Proportional"),
|
|
268
268
|
value: 'proportional'
|
|
269
269
|
}, {
|
|
270
|
-
label: nls.localize(
|
|
270
|
+
label: nls.localize(963, "Fill"),
|
|
271
271
|
value: 'fill'
|
|
272
272
|
}, {
|
|
273
|
-
label: nls.localize(
|
|
273
|
+
label: nls.localize(964, "Fit"),
|
|
274
274
|
value: 'fit'
|
|
275
275
|
}]));
|
|
276
|
-
actions.push(createEnumAction(nls.localize(
|
|
277
|
-
label: nls.localize(
|
|
276
|
+
actions.push(createEnumAction(nls.localize(965, "Slider"), minimapOptions.enabled, 'editor.minimap.showSlider', minimapOptions.showSlider, [{
|
|
277
|
+
label: nls.localize(966, "Mouse Over"),
|
|
278
278
|
value: 'mouseover'
|
|
279
279
|
}, {
|
|
280
|
-
label: nls.localize(
|
|
280
|
+
label: nls.localize(967, "Always"),
|
|
281
281
|
value: 'always'
|
|
282
282
|
}]));
|
|
283
|
-
actions.push(createEnumAction(nls.localize(
|
|
284
|
-
label: nls.localize(
|
|
283
|
+
actions.push(createEnumAction(nls.localize(968, "Side"), minimapOptions.enabled, 'editor.minimap.side', minimapOptions.side, [{
|
|
284
|
+
label: nls.localize(969, "Right"),
|
|
285
285
|
value: 'right'
|
|
286
286
|
}, {
|
|
287
|
-
label: nls.localize(
|
|
287
|
+
label: nls.localize(970, "Left"),
|
|
288
288
|
value: 'left'
|
|
289
289
|
}]));
|
|
290
|
-
const useShadowDOM = this._editor.getOption(
|
|
290
|
+
const useShadowDOM = this._editor.getOption(147 /* EditorOption.useShadowDOM */) && !isIOS; // Do not use shadow dom on IOS #122035
|
|
291
291
|
this._contextMenuIsBeingShownCount++;
|
|
292
292
|
this._contextMenuService.showContextMenu({
|
|
293
293
|
domForShadowRoot: useShadowDOM ? this._editor.getDomNode() : undefined,
|
|
@@ -324,7 +324,7 @@ class ShowContextMenu extends EditorAction {
|
|
|
324
324
|
constructor() {
|
|
325
325
|
super({
|
|
326
326
|
id: 'editor.action.showContextMenu',
|
|
327
|
-
label: nls.localize2(
|
|
327
|
+
label: nls.localize2(971, "Show Editor Context Menu"),
|
|
328
328
|
precondition: undefined,
|
|
329
329
|
kbOpts: {
|
|
330
330
|
kbExpr: EditorContextKeys.textInputFocus,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["vs/editor/contrib/contextmenu/browser/contextmenu.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;;AAEhG,OAAO,KAAK,GAAG,MAAM,iCAAiC,CAAC;AAGvD,OAAO,EAAE,cAAc,EAAE,MAAM,0DAA0D,CAAC;AAE1F,OAAO,EAAW,SAAS,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAGvF,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,KAAK,EAAE,MAAM,qCAAqC,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAmC,oBAAoB,EAAE,0BAA0B,EAAoB,MAAM,sCAAsC,CAAC;AAGzK,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAEzE,OAAO,KAAK,GAAG,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAU,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AACzG,OAAO,EAAE,kBAAkB,EAAE,MAAM,sDAAsD,CAAC;AAC1F,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,yDAAyD,CAAC;AACnH,OAAO,EAAE,kBAAkB,EAAE,MAAM,sDAAsD,CAAC;AAE1F,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AACnG,OAAO,EAAE,wBAAwB,EAA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AAC;IAEO,cAAc,CAAC,MAAe;QACrC,OAAO,IAAI,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC5D,CAAC;IAEM,OAAO;QACb,IAAI,IAAI,CAAC,6BAA6B,GAAG,CAAC,EAAE,CAAC;YAC5C,IAAI,CAAC,mBAAmB,CAAC,eAAe,EAAE,CAAC;QAC5C,CAAC;QAED,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;;AAvWW,qBAAqB;IAc/B,WAAA,mBAAmB,CAAA;IACnB,WAAA,mBAAmB,CAAA;IACnB,WAAA,kBAAkB,CAAA;IAClB,WAAA,kBAAkB,CAAA;IAClB,WAAA,YAAY,CAAA;IACZ,WAAA,qBAAqB,CAAA;IACrB,WAAA,wBAAwB,CAAA;GApBd,qBAAqB,CAwWjC;;AAED,MAAM,eAAgB,SAAQ,YAAY;IAEzC;QACC,KAAK,CAAC;YACL,EAAE,EAAE,+BAA+B;YACnC,KAAK,EAAE,GAAG,CAAC,SAAS,CAAC,GAA8B,EAAE,0BAA0B,CAAC;YAChF,YAAY,EAAE,SAAS;YACvB,MAAM,EAAE;gBACP,MAAM,EAAE,iBAAiB,CAAC,cAAc;gBACxC,OAAO,EAAE,8CAA0B;gBACnC,MAAM,0CAAgC;aACtC;SACD,CAAC,CAAC;IACJ,CAAC;IAEM,GAAG,CAAC,QAA0B,EAAE,MAAmB;QACzD,qBAAqB,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,eAAe,EAAE,CAAC;IACtD,CAAC;CACD;AAED,0BAA0B,CAAC,qBAAqB,CAAC,EAAE,EAAE,qBAAqB,iEAAyD,CAAC;AACpI,oBAAoB,CAAC,eAAe,CAAC,CAAC","file":"contextmenu.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as dom from '../../../../base/browser/dom.js';\nimport { IKeyboardEvent } from '../../../../base/browser/keyboardEvent.js';\nimport { IMouseEvent, IMouseWheelEvent } from '../../../../base/browser/mouseEvent.js';\nimport { ActionViewItem } from '../../../../base/browser/ui/actionbar/actionViewItems.js';\nimport { IAnchor } from '../../../../base/browser/ui/contextview/contextview.js';\nimport { IAction, Separator, SubmenuAction } from '../../../../base/common/actions.js';\nimport { KeyCode, KeyMod } from '../../../../base/common/keyCodes.js';\nimport { ResolvedKeybinding } from '../../../../base/common/keybindings.js';\nimport { DisposableStore } from '../../../../base/common/lifecycle.js';\nimport { isIOS } from '../../../../base/common/platform.js';\nimport { ICodeEditor, IEditorMouseEvent, MouseTargetType } from '../../../browser/editorBrowser.js';\nimport { EditorAction, EditorContributionInstantiation, registerEditorAction, registerEditorContribution, ServicesAccessor } from '../../../browser/editorExtensions.js';\nimport { EditorOption } from '../../../common/config/editorOptions.js';\nimport { IEditorContribution, ScrollType } from '../../../common/editorCommon.js';\nimport { EditorContextKeys } from '../../../common/editorContextKeys.js';\nimport { ITextModel } from '../../../common/model.js';\nimport * as nls from '../../../../nls.js';\nimport { IMenuService, MenuId, SubmenuItemAction } from '../../../../platform/actions/common/actions.js';\nimport { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';\nimport { IContextMenuService, IContextViewService } from '../../../../platform/contextview/browser/contextView.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { KeybindingWeight } from '../../../../platform/keybinding/common/keybindingsRegistry.js';\nimport { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';\nimport { IWorkspaceContextService, isStandaloneEditorWorkspace } from '../../../../platform/workspace/common/workspace.js';\n\nexport class ContextMenuController implements IEditorContribution {\n\n\tpublic static readonly ID = 'editor.contrib.contextmenu';\n\n\tpublic static get(editor: ICodeEditor): ContextMenuController | null {\n\t\treturn editor.getContribution<ContextMenuController>(ContextMenuController.ID);\n\t}\n\n\tprivate readonly _toDispose = new DisposableStore();\n\tprivate _contextMenuIsBeingShownCount: number = 0;\n\tprivate readonly _editor: ICodeEditor;\n\n\tconstructor(\n\t\teditor: ICodeEditor,\n\t\t@IContextMenuService private readonly _contextMenuService: IContextMenuService,\n\t\t@IContextViewService private readonly _contextViewService: IContextViewService,\n\t\t@IContextKeyService private readonly _contextKeyService: IContextKeyService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t\t@IMenuService private readonly _menuService: IMenuService,\n\t\t@IConfigurationService private readonly _configurationService: IConfigurationService,\n\t\t@IWorkspaceContextService private readonly _workspaceContextService: IWorkspaceContextService,\n\t) {\n\t\tthis._editor = editor;\n\n\t\tthis._toDispose.add(this._editor.onContextMenu((e: IEditorMouseEvent) => this._onContextMenu(e)));\n\t\tthis._toDispose.add(this._editor.onMouseWheel((e: IMouseWheelEvent) => {\n\t\t\tif (this._contextMenuIsBeingShownCount > 0) {\n\t\t\t\tconst view = this._contextViewService.getContextViewElement();\n\t\t\t\tconst target = e.srcElement as HTMLElement;\n\n\t\t\t\t// Event triggers on shadow root host first\n\t\t\t\t// Check if the context view is under this host before hiding it #103169\n\t\t\t\tif (!(target.shadowRoot && dom.getShadowRoot(view) === target.shadowRoot)) {\n\t\t\t\t\tthis._contextViewService.hideContextView();\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\t\tthis._toDispose.add(this._editor.onKeyDown((e: IKeyboardEvent) => {\n\t\t\tif (!this._editor.getOption(EditorOption.contextmenu)) {\n\t\t\t\treturn; // Context menu is turned off through configuration\n\t\t\t}\n\t\t\tif (e.keyCode === KeyCode.ContextMenu) {\n\t\t\t\t// Chrome is funny like that\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopPropagation();\n\t\t\t\tthis.showContextMenu();\n\t\t\t}\n\t\t}));\n\t}\n\n\tprivate _onContextMenu(e: IEditorMouseEvent): void {\n\t\tif (!this._editor.hasModel()) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._editor.getOption(EditorOption.contextmenu)) {\n\t\t\tthis._editor.focus();\n\t\t\t// Ensure the cursor is at the position of the mouse click\n\t\t\tif (e.target.position && !this._editor.getSelection().containsPosition(e.target.position)) {\n\t\t\t\tthis._editor.setPosition(e.target.position);\n\t\t\t}\n\t\t\treturn; // Context menu is turned off through configuration\n\t\t}\n\n\t\tif (e.target.type === MouseTargetType.OVERLAY_WIDGET) {\n\t\t\treturn; // allow native menu on widgets to support right click on input field for example in find\n\t\t}\n\t\tif (e.target.type === MouseTargetType.CONTENT_TEXT && e.target.detail.injectedText) {\n\t\t\treturn; // allow native menu on injected text\n\t\t}\n\n\t\te.event.preventDefault();\n\t\te.event.stopPropagation();\n\n\t\tif (e.target.type === MouseTargetType.SCROLLBAR) {\n\t\t\treturn this._showScrollbarContextMenu(e.event);\n\t\t}\n\n\t\tif (e.target.type !== MouseTargetType.CONTENT_TEXT && e.target.type !== MouseTargetType.CONTENT_EMPTY && e.target.type !== MouseTargetType.TEXTAREA) {\n\t\t\treturn; // only support mouse click into text or native context menu key for now\n\t\t}\n\n\t\t// Ensure the editor gets focus if it hasn't, so the right events are being sent to other contributions\n\t\tthis._editor.focus();\n\n\t\t// Ensure the cursor is at the position of the mouse click\n\t\tif (e.target.position) {\n\t\t\tlet hasSelectionAtPosition = false;\n\t\t\tfor (const selection of this._editor.getSelections()) {\n\t\t\t\tif (selection.containsPosition(e.target.position)) {\n\t\t\t\t\thasSelectionAtPosition = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!hasSelectionAtPosition) {\n\t\t\t\tthis._editor.setPosition(e.target.position);\n\t\t\t}\n\t\t}\n\n\t\t// Unless the user triggerd the context menu through Shift+F10, use the mouse position as menu position\n\t\tlet anchor: IMouseEvent | null = null;\n\t\tif (e.target.type !== MouseTargetType.TEXTAREA) {\n\t\t\tanchor = e.event;\n\t\t}\n\n\t\t// Show the context menu\n\t\tthis.showContextMenu(anchor);\n\t}\n\n\tpublic showContextMenu(anchor?: IMouseEvent | null): void {\n\t\tif (!this._editor.getOption(EditorOption.contextmenu)) {\n\t\t\treturn; // Context menu is turned off through configuration\n\t\t}\n\t\tif (!this._editor.hasModel()) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Find actions available for menu\n\t\tconst menuActions = this._getMenuActions(this._editor.getModel(),\n\t\t\tthis._editor.contextMenuId);\n\n\t\t// Show menu if we have actions to show\n\t\tif (menuActions.length > 0) {\n\t\t\tthis._doShowContextMenu(menuActions, anchor);\n\t\t}\n\t}\n\n\tprivate _getMenuActions(model: ITextModel, menuId: MenuId): IAction[] {\n\t\tconst result: IAction[] = [];\n\n\t\t// get menu groups\n\t\tconst groups = this._menuService.getMenuActions(menuId, this._contextKeyService, { arg: model.uri });\n\n\t\t// translate them into other actions\n\t\tfor (const group of groups) {\n\t\t\tconst [, actions] = group;\n\t\t\tlet addedItems = 0;\n\t\t\tfor (const action of actions) {\n\t\t\t\tif (action instanceof SubmenuItemAction) {\n\t\t\t\t\tconst subActions = this._getMenuActions(model, action.item.submenu);\n\t\t\t\t\tif (subActions.length > 0) {\n\t\t\t\t\t\tresult.push(new SubmenuAction(action.id, action.label, subActions));\n\t\t\t\t\t\taddedItems++;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tresult.push(action);\n\t\t\t\t\taddedItems++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (addedItems) {\n\t\t\t\tresult.push(new Separator());\n\t\t\t}\n\t\t}\n\n\t\tif (result.length) {\n\t\t\tresult.pop(); // remove last separator\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tprivate _doShowContextMenu(actions: IAction[], event: IMouseEvent | null = null): void {\n\t\tif (!this._editor.hasModel()) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet anchor: IMouseEvent | IAnchor | null = event;\n\t\tif (!anchor) {\n\t\t\t// Ensure selection is visible\n\t\t\tthis._editor.revealPosition(this._editor.getPosition(), ScrollType.Immediate);\n\n\t\t\tthis._editor.render();\n\t\t\tconst cursorCoords = this._editor.getScrolledVisiblePosition(this._editor.getPosition());\n\n\t\t\t// Translate to absolute editor position\n\t\t\tconst editorCoords = dom.getDomNodePagePosition(this._editor.getDomNode());\n\t\t\tconst posx = editorCoords.left + cursorCoords.left;\n\t\t\tconst posy = editorCoords.top + cursorCoords.top + cursorCoords.height;\n\n\t\t\tanchor = { x: posx, y: posy };\n\t\t}\n\n\t\tconst useShadowDOM = this._editor.getOption(EditorOption.useShadowDOM) && !isIOS; // Do not use shadow dom on IOS #122035\n\n\t\t// Show menu\n\t\tthis._contextMenuIsBeingShownCount++;\n\t\tthis._contextMenuService.showContextMenu({\n\t\t\tdomForShadowRoot: useShadowDOM ? this._editor.getOverflowWidgetsDomNode() ?? this._editor.getDomNode() : undefined,\n\t\t\tuseWindowContainerForShadowRoot: useShadowDOM && this._editor.getOption(EditorOption.fixedOverflowWidgets),\n\n\t\t\tgetAnchor: () => anchor,\n\n\t\t\tgetActions: () => actions,\n\n\t\t\tgetActionViewItem: (action) => {\n\t\t\t\tconst keybinding = this._keybindingFor(action);\n\t\t\t\tif (keybinding) {\n\t\t\t\t\treturn new ActionViewItem(action, action, { label: true, keybinding: keybinding.getLabel(), isMenu: true });\n\t\t\t\t}\n\n\t\t\t\tconst customAction = action as IAction & { getActionViewItem?: () => ActionViewItem };\n\t\t\t\tif (typeof customAction.getActionViewItem === 'function') {\n\t\t\t\t\treturn customAction.getActionViewItem();\n\t\t\t\t}\n\n\t\t\t\treturn new ActionViewItem(action, action, { icon: true, label: true, isMenu: true });\n\t\t\t},\n\n\t\t\tgetKeyBinding: (action): ResolvedKeybinding | undefined => {\n\t\t\t\treturn this._keybindingFor(action);\n\t\t\t},\n\n\t\t\tonHide: (wasCancelled: boolean) => {\n\t\t\t\tthis._contextMenuIsBeingShownCount--;\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _showScrollbarContextMenu(anchor: IMouseEvent): void {\n\t\tif (!this._editor.hasModel()) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isStandaloneEditorWorkspace(this._workspaceContextService.getWorkspace())) {\n\t\t\t// can't update the configuration properly in the standalone editor\n\t\t\treturn;\n\t\t}\n\n\t\tconst minimapOptions = this._editor.getOption(EditorOption.minimap);\n\n\t\tlet lastId = 0;\n\t\tconst createAction = (opts: { label: string; enabled?: boolean; checked?: boolean; run: () => void }): IAction => {\n\t\t\treturn {\n\t\t\t\tid: `menu-action-${++lastId}`,\n\t\t\t\tlabel: opts.label,\n\t\t\t\ttooltip: '',\n\t\t\t\tclass: undefined,\n\t\t\t\tenabled: (typeof opts.enabled === 'undefined' ? true : opts.enabled),\n\t\t\t\tchecked: opts.checked,\n\t\t\t\trun: opts.run\n\t\t\t};\n\t\t};\n\t\tconst createSubmenuAction = (label: string, actions: IAction[]): SubmenuAction => {\n\t\t\treturn new SubmenuAction(\n\t\t\t\t`menu-action-${++lastId}`,\n\t\t\t\tlabel,\n\t\t\t\tactions,\n\t\t\t\tundefined\n\t\t\t);\n\t\t};\n\t\tconst createEnumAction = <T>(label: string, enabled: boolean, configName: string, configuredValue: T, options: { label: string; value: T }[]): IAction => {\n\t\t\tif (!enabled) {\n\t\t\t\treturn createAction({ label, enabled, run: () => { } });\n\t\t\t}\n\t\t\tconst createRunner = (value: T) => {\n\t\t\t\treturn () => {\n\t\t\t\t\tthis._configurationService.updateValue(configName, value);\n\t\t\t\t};\n\t\t\t};\n\t\t\tconst actions: IAction[] = [];\n\t\t\tfor (const option of options) {\n\t\t\t\tactions.push(createAction({\n\t\t\t\t\tlabel: option.label,\n\t\t\t\t\tchecked: configuredValue === option.value,\n\t\t\t\t\trun: createRunner(option.value)\n\t\t\t\t}));\n\t\t\t}\n\t\t\treturn createSubmenuAction(\n\t\t\t\tlabel,\n\t\t\t\tactions\n\t\t\t);\n\t\t};\n\n\t\tconst actions: IAction[] = [];\n\t\tactions.push(createAction({\n\t\t\tlabel: nls.localize('context.minimap.minimap', \"Minimap\"),\n\t\t\tchecked: minimapOptions.enabled,\n\t\t\trun: () => {\n\t\t\t\tthis._configurationService.updateValue(`editor.minimap.enabled`, !minimapOptions.enabled);\n\t\t\t}\n\t\t}));\n\t\tactions.push(new Separator());\n\t\tactions.push(createAction({\n\t\t\tlabel: nls.localize('context.minimap.renderCharacters', \"Render Characters\"),\n\t\t\tenabled: minimapOptions.enabled,\n\t\t\tchecked: minimapOptions.renderCharacters,\n\t\t\trun: () => {\n\t\t\t\tthis._configurationService.updateValue(`editor.minimap.renderCharacters`, !minimapOptions.renderCharacters);\n\t\t\t}\n\t\t}));\n\t\tactions.push(createEnumAction<'proportional' | 'fill' | 'fit'>(\n\t\t\tnls.localize('context.minimap.size', \"Vertical size\"),\n\t\t\tminimapOptions.enabled,\n\t\t\t'editor.minimap.size',\n\t\t\tminimapOptions.size,\n\t\t\t[{\n\t\t\t\tlabel: nls.localize('context.minimap.size.proportional', \"Proportional\"),\n\t\t\t\tvalue: 'proportional'\n\t\t\t}, {\n\t\t\t\tlabel: nls.localize('context.minimap.size.fill', \"Fill\"),\n\t\t\t\tvalue: 'fill'\n\t\t\t}, {\n\t\t\t\tlabel: nls.localize('context.minimap.size.fit', \"Fit\"),\n\t\t\t\tvalue: 'fit'\n\t\t\t}]\n\t\t));\n\t\tactions.push(createEnumAction<'always' | 'mouseover'>(\n\t\t\tnls.localize('context.minimap.slider', \"Slider\"),\n\t\t\tminimapOptions.enabled,\n\t\t\t'editor.minimap.showSlider',\n\t\t\tminimapOptions.showSlider,\n\t\t\t[{\n\t\t\t\tlabel: nls.localize('context.minimap.slider.mouseover', \"Mouse Over\"),\n\t\t\t\tvalue: 'mouseover'\n\t\t\t}, {\n\t\t\t\tlabel: nls.localize('context.minimap.slider.always', \"Always\"),\n\t\t\t\tvalue: 'always'\n\t\t\t}]\n\t\t));\n\t\tactions.push(createEnumAction<'right' | 'left'>(\n\t\t\tnls.localize('context.minimap.side', \"Side\"),\n\t\t\tminimapOptions.enabled,\n\t\t\t'editor.minimap.side',\n\t\t\tminimapOptions.side,\n\t\t\t[{\n\t\t\t\tlabel: nls.localize('context.minimap.side.right', \"Right\"),\n\t\t\t\tvalue: 'right'\n\t\t\t}, {\n\t\t\t\tlabel: nls.localize('context.minimap.side.left', \"Left\"),\n\t\t\t\tvalue: 'left'\n\t\t\t}]\n\t\t));\n\n\t\tconst useShadowDOM = this._editor.getOption(EditorOption.useShadowDOM) && !isIOS; // Do not use shadow dom on IOS #122035\n\t\tthis._contextMenuIsBeingShownCount++;\n\t\tthis._contextMenuService.showContextMenu({\n\t\t\tdomForShadowRoot: useShadowDOM ? this._editor.getDomNode() : undefined,\n\t\t\tuseWindowContainerForShadowRoot: useShadowDOM && this._editor.getOption(EditorOption.fixedOverflowWidgets),\n\t\t\tgetAnchor: () => anchor,\n\t\t\tgetActions: () => actions,\n\t\t\tonHide: (wasCancelled: boolean) => {\n\t\t\t\tthis._contextMenuIsBeingShownCount--;\n\t\t\t\tthis._editor.focus();\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _keybindingFor(action: IAction): ResolvedKeybinding | undefined {\n\t\treturn this._keybindingService.lookupKeybinding(action.id);\n\t}\n\n\tpublic dispose(): void {\n\t\tif (this._contextMenuIsBeingShownCount > 0) {\n\t\t\tthis._contextViewService.hideContextView();\n\t\t}\n\n\t\tthis._toDispose.dispose();\n\t}\n}\n\nclass ShowContextMenu extends EditorAction {\n\n\tconstructor() {\n\t\tsuper({\n\t\t\tid: 'editor.action.showContextMenu',\n\t\t\tlabel: nls.localize2('action.showContextMenu.label', \"Show Editor Context Menu\"),\n\t\t\tprecondition: undefined,\n\t\t\tkbOpts: {\n\t\t\t\tkbExpr: EditorContextKeys.textInputFocus,\n\t\t\t\tprimary: KeyMod.Shift | KeyCode.F10,\n\t\t\t\tweight: KeybindingWeight.EditorContrib\n\t\t\t}\n\t\t});\n\t}\n\n\tpublic run(accessor: ServicesAccessor, editor: ICodeEditor): void {\n\t\tContextMenuController.get(editor)?.showContextMenu();\n\t}\n}\n\nregisterEditorContribution(ContextMenuController.ID, ContextMenuController, EditorContributionInstantiation.BeforeFirstInteraction);\nregisterEditorAction(ShowContextMenu);\n"]}
|
|
1
|
+
{"version":3,"sources":["vs/editor/contrib/contextmenu/browser/contextmenu.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;;AAEhG,OAAO,KAAK,GAAG,MAAM,iCAAiC,CAAC;AAGvD,OAAO,EAAE,cAAc,EAAE,MAAM,0DAA0D,CAAC;AAE1F,OAAO,EAAW,SAAS,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAGvF,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,KAAK,EAAE,MAAM,qCAAqC,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAmC,oBAAoB,EAAE,0BAA0B,EAAoB,MAAM,sCAAsC,CAAC;AAGzK,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAEzE,OAAO,KAAK,GAAG,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAU,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AACzG,OAAO,EAAE,kBAAkB,EAAE,MAAM,sDAAsD,CAAC;AAC1F,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,yDAAyD,CAAC;AACnH,OAAO,EAAE,kBAAkB,EAAE,MAAM,sDAAsD,CAAC;AAE1F,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AACnG,OAAO,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,MAAM,oDAAoD,CAAC;AAEpH,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;;aAEV,OAAE,GAAG,4BAAH,AAA+B,CAAC;IAElD,MAAM,CAAC,GAAG,CAAC,MAAmB;QACpC,OAAO,MAAM,CAAC,eAAe,CAAwB,uBAAqB,CAAC,EAAE,CAAC,CAAC;IAChF,CAAC;IAMD,YACC,M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CAAC;QAED,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;;AAvWW,qBAAqB;IAc/B,WAAA,mBAAmB,CAAA;IACnB,WAAA,mBAAmB,CAAA;IACnB,WAAA,kBAAkB,CAAA;IAClB,WAAA,kBAAkB,CAAA;IAClB,WAAA,YAAY,CAAA;IACZ,WAAA,qBAAqB,CAAA;IACrB,WAAA,wBAAwB,CAAA;GApBd,qBAAqB,CAwWjC;;AAED,MAAM,eAAgB,SAAQ,YAAY;IAEzC;QACC,KAAK,CAAC;YACL,EAAE,EAAE,+BAA+B;YACnC,KAAK,EAAE,GAAG,CAAC,SAAS,CAAC,GAA8B,EAAE,0BAA0B,CAAC;YAChF,YAAY,EAAE,SAAS;YACvB,MAAM,EAAE;gBACP,MAAM,EAAE,iBAAiB,CAAC,cAAc;gBACxC,OAAO,EAAE,8CAA0B;gBACnC,MAAM,0CAAgC;aACtC;SACD,CAAC,CAAC;IACJ,CAAC;IAEM,GAAG,CAAC,QAA0B,EAAE,MAAmB;QACzD,qBAAqB,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,eAAe,EAAE,CAAC;IACtD,CAAC;CACD;AAED,0BAA0B,CAAC,qBAAqB,CAAC,EAAE,EAAE,qBAAqB,iEAAyD,CAAC;AACpI,oBAAoB,CAAC,eAAe,CAAC,CAAC","file":"contextmenu.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as dom from '../../../../base/browser/dom.js';\nimport { IKeyboardEvent } from '../../../../base/browser/keyboardEvent.js';\nimport { IMouseEvent, IMouseWheelEvent } from '../../../../base/browser/mouseEvent.js';\nimport { ActionViewItem } from '../../../../base/browser/ui/actionbar/actionViewItems.js';\nimport { IAnchor } from '../../../../base/browser/ui/contextview/contextview.js';\nimport { IAction, Separator, SubmenuAction } from '../../../../base/common/actions.js';\nimport { KeyCode, KeyMod } from '../../../../base/common/keyCodes.js';\nimport { ResolvedKeybinding } from '../../../../base/common/keybindings.js';\nimport { DisposableStore } from '../../../../base/common/lifecycle.js';\nimport { isIOS } from '../../../../base/common/platform.js';\nimport { ICodeEditor, IEditorMouseEvent, MouseTargetType } from '../../../browser/editorBrowser.js';\nimport { EditorAction, EditorContributionInstantiation, registerEditorAction, registerEditorContribution, ServicesAccessor } from '../../../browser/editorExtensions.js';\nimport { EditorOption } from '../../../common/config/editorOptions.js';\nimport { IEditorContribution, ScrollType } from '../../../common/editorCommon.js';\nimport { EditorContextKeys } from '../../../common/editorContextKeys.js';\nimport { ITextModel } from '../../../common/model.js';\nimport * as nls from '../../../../nls.js';\nimport { IMenuService, MenuId, SubmenuItemAction } from '../../../../platform/actions/common/actions.js';\nimport { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';\nimport { IContextMenuService, IContextViewService } from '../../../../platform/contextview/browser/contextView.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { KeybindingWeight } from '../../../../platform/keybinding/common/keybindingsRegistry.js';\nimport { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';\nimport { IWorkspaceContextService, isStandaloneEditorWorkspace } from '../../../../platform/workspace/common/workspace.js';\n\nexport class ContextMenuController implements IEditorContribution {\n\n\tpublic static readonly ID = 'editor.contrib.contextmenu';\n\n\tpublic static get(editor: ICodeEditor): ContextMenuController | null {\n\t\treturn editor.getContribution<ContextMenuController>(ContextMenuController.ID);\n\t}\n\n\tprivate readonly _toDispose = new DisposableStore();\n\tprivate _contextMenuIsBeingShownCount: number = 0;\n\tprivate readonly _editor: ICodeEditor;\n\n\tconstructor(\n\t\teditor: ICodeEditor,\n\t\t@IContextMenuService private readonly _contextMenuService: IContextMenuService,\n\t\t@IContextViewService private readonly _contextViewService: IContextViewService,\n\t\t@IContextKeyService private readonly _contextKeyService: IContextKeyService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t\t@IMenuService private readonly _menuService: IMenuService,\n\t\t@IConfigurationService private readonly _configurationService: IConfigurationService,\n\t\t@IWorkspaceContextService private readonly _workspaceContextService: IWorkspaceContextService,\n\t) {\n\t\tthis._editor = editor;\n\n\t\tthis._toDispose.add(this._editor.onContextMenu((e: IEditorMouseEvent) => this._onContextMenu(e)));\n\t\tthis._toDispose.add(this._editor.onMouseWheel((e: IMouseWheelEvent) => {\n\t\t\tif (this._contextMenuIsBeingShownCount > 0) {\n\t\t\t\tconst view = this._contextViewService.getContextViewElement();\n\t\t\t\tconst target = e.srcElement as HTMLElement;\n\n\t\t\t\t// Event triggers on shadow root host first\n\t\t\t\t// Check if the context view is under this host before hiding it #103169\n\t\t\t\tif (!(target.shadowRoot && dom.getShadowRoot(view) === target.shadowRoot)) {\n\t\t\t\t\tthis._contextViewService.hideContextView();\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\t\tthis._toDispose.add(this._editor.onKeyDown((e: IKeyboardEvent) => {\n\t\t\tif (!this._editor.getOption(EditorOption.contextmenu)) {\n\t\t\t\treturn; // Context menu is turned off through configuration\n\t\t\t}\n\t\t\tif (e.keyCode === KeyCode.ContextMenu) {\n\t\t\t\t// Chrome is funny like that\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopPropagation();\n\t\t\t\tthis.showContextMenu();\n\t\t\t}\n\t\t}));\n\t}\n\n\tprivate _onContextMenu(e: IEditorMouseEvent): void {\n\t\tif (!this._editor.hasModel()) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._editor.getOption(EditorOption.contextmenu)) {\n\t\t\tthis._editor.focus();\n\t\t\t// Ensure the cursor is at the position of the mouse click\n\t\t\tif (e.target.position && !this._editor.getSelection().containsPosition(e.target.position)) {\n\t\t\t\tthis._editor.setPosition(e.target.position);\n\t\t\t}\n\t\t\treturn; // Context menu is turned off through configuration\n\t\t}\n\n\t\tif (e.target.type === MouseTargetType.OVERLAY_WIDGET) {\n\t\t\treturn; // allow native menu on widgets to support right click on input field for example in find\n\t\t}\n\t\tif (e.target.type === MouseTargetType.CONTENT_TEXT && e.target.detail.injectedText) {\n\t\t\treturn; // allow native menu on injected text\n\t\t}\n\n\t\te.event.preventDefault();\n\t\te.event.stopPropagation();\n\n\t\tif (e.target.type === MouseTargetType.SCROLLBAR) {\n\t\t\treturn this._showScrollbarContextMenu(e.event);\n\t\t}\n\n\t\tif (e.target.type !== MouseTargetType.CONTENT_TEXT && e.target.type !== MouseTargetType.CONTENT_EMPTY && e.target.type !== MouseTargetType.TEXTAREA) {\n\t\t\treturn; // only support mouse click into text or native context menu key for now\n\t\t}\n\n\t\t// Ensure the editor gets focus if it hasn't, so the right events are being sent to other contributions\n\t\tthis._editor.focus();\n\n\t\t// Ensure the cursor is at the position of the mouse click\n\t\tif (e.target.position) {\n\t\t\tlet hasSelectionAtPosition = false;\n\t\t\tfor (const selection of this._editor.getSelections()) {\n\t\t\t\tif (selection.containsPosition(e.target.position)) {\n\t\t\t\t\thasSelectionAtPosition = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!hasSelectionAtPosition) {\n\t\t\t\tthis._editor.setPosition(e.target.position);\n\t\t\t}\n\t\t}\n\n\t\t// Unless the user triggered the context menu through Shift+F10, use the mouse position as menu position\n\t\tlet anchor: IMouseEvent | null = null;\n\t\tif (e.target.type !== MouseTargetType.TEXTAREA) {\n\t\t\tanchor = e.event;\n\t\t}\n\n\t\t// Show the context menu\n\t\tthis.showContextMenu(anchor);\n\t}\n\n\tpublic showContextMenu(anchor?: IMouseEvent | null): void {\n\t\tif (!this._editor.getOption(EditorOption.contextmenu)) {\n\t\t\treturn; // Context menu is turned off through configuration\n\t\t}\n\t\tif (!this._editor.hasModel()) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Find actions available for menu\n\t\tconst menuActions = this._getMenuActions(this._editor.getModel(),\n\t\t\tthis._editor.contextMenuId);\n\n\t\t// Show menu if we have actions to show\n\t\tif (menuActions.length > 0) {\n\t\t\tthis._doShowContextMenu(menuActions, anchor);\n\t\t}\n\t}\n\n\tprivate _getMenuActions(model: ITextModel, menuId: MenuId): IAction[] {\n\t\tconst result: IAction[] = [];\n\n\t\t// get menu groups\n\t\tconst groups = this._menuService.getMenuActions(menuId, this._contextKeyService, { arg: model.uri });\n\n\t\t// translate them into other actions\n\t\tfor (const group of groups) {\n\t\t\tconst [, actions] = group;\n\t\t\tlet addedItems = 0;\n\t\t\tfor (const action of actions) {\n\t\t\t\tif (action instanceof SubmenuItemAction) {\n\t\t\t\t\tconst subActions = this._getMenuActions(model, action.item.submenu);\n\t\t\t\t\tif (subActions.length > 0) {\n\t\t\t\t\t\tresult.push(new SubmenuAction(action.id, action.label, subActions));\n\t\t\t\t\t\taddedItems++;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tresult.push(action);\n\t\t\t\t\taddedItems++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (addedItems) {\n\t\t\t\tresult.push(new Separator());\n\t\t\t}\n\t\t}\n\n\t\tif (result.length) {\n\t\t\tresult.pop(); // remove last separator\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tprivate _doShowContextMenu(actions: IAction[], event: IMouseEvent | null = null): void {\n\t\tif (!this._editor.hasModel()) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet anchor: IMouseEvent | IAnchor | null = event;\n\t\tif (!anchor) {\n\t\t\t// Ensure selection is visible\n\t\t\tthis._editor.revealPosition(this._editor.getPosition(), ScrollType.Immediate);\n\n\t\t\tthis._editor.render();\n\t\t\tconst cursorCoords = this._editor.getScrolledVisiblePosition(this._editor.getPosition());\n\n\t\t\t// Translate to absolute editor position\n\t\t\tconst editorCoords = dom.getDomNodePagePosition(this._editor.getDomNode());\n\t\t\tconst posx = editorCoords.left + cursorCoords.left;\n\t\t\tconst posy = editorCoords.top + cursorCoords.top + cursorCoords.height;\n\n\t\t\tanchor = { x: posx, y: posy };\n\t\t}\n\n\t\tconst useShadowDOM = this._editor.getOption(EditorOption.useShadowDOM) && !isIOS; // Do not use shadow dom on IOS #122035\n\n\t\t// Show menu\n\t\tthis._contextMenuIsBeingShownCount++;\n\t\tthis._contextMenuService.showContextMenu({\n\t\t\tdomForShadowRoot: useShadowDOM ? this._editor.getOverflowWidgetsDomNode() ?? this._editor.getDomNode() : undefined,\n\t\t\tuseWindowContainerForShadowRoot: useShadowDOM && this._editor.getOption(EditorOption.fixedOverflowWidgets),\n\n\t\t\tgetAnchor: () => anchor,\n\n\t\t\tgetActions: () => actions,\n\n\t\t\tgetActionViewItem: (action) => {\n\t\t\t\tconst keybinding = this._keybindingFor(action);\n\t\t\t\tif (keybinding) {\n\t\t\t\t\treturn new ActionViewItem(action, action, { label: true, keybinding: keybinding.getLabel(), isMenu: true });\n\t\t\t\t}\n\n\t\t\t\tconst customAction = action as IAction & { getActionViewItem?: () => ActionViewItem };\n\t\t\t\tif (typeof customAction.getActionViewItem === 'function') {\n\t\t\t\t\treturn customAction.getActionViewItem();\n\t\t\t\t}\n\n\t\t\t\treturn new ActionViewItem(action, action, { icon: true, label: true, isMenu: true });\n\t\t\t},\n\n\t\t\tgetKeyBinding: (action): ResolvedKeybinding | undefined => {\n\t\t\t\treturn this._keybindingFor(action);\n\t\t\t},\n\n\t\t\tonHide: (wasCancelled: boolean) => {\n\t\t\t\tthis._contextMenuIsBeingShownCount--;\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _showScrollbarContextMenu(anchor: IMouseEvent): void {\n\t\tif (!this._editor.hasModel()) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isStandaloneEditorWorkspace(this._workspaceContextService.getWorkspace())) {\n\t\t\t// can't update the configuration properly in the standalone editor\n\t\t\treturn;\n\t\t}\n\n\t\tconst minimapOptions = this._editor.getOption(EditorOption.minimap);\n\n\t\tlet lastId = 0;\n\t\tconst createAction = (opts: { label: string; enabled?: boolean; checked?: boolean; run: () => void }): IAction => {\n\t\t\treturn {\n\t\t\t\tid: `menu-action-${++lastId}`,\n\t\t\t\tlabel: opts.label,\n\t\t\t\ttooltip: '',\n\t\t\t\tclass: undefined,\n\t\t\t\tenabled: (typeof opts.enabled === 'undefined' ? true : opts.enabled),\n\t\t\t\tchecked: opts.checked,\n\t\t\t\trun: opts.run\n\t\t\t};\n\t\t};\n\t\tconst createSubmenuAction = (label: string, actions: IAction[]): SubmenuAction => {\n\t\t\treturn new SubmenuAction(\n\t\t\t\t`menu-action-${++lastId}`,\n\t\t\t\tlabel,\n\t\t\t\tactions,\n\t\t\t\tundefined\n\t\t\t);\n\t\t};\n\t\tconst createEnumAction = <T>(label: string, enabled: boolean, configName: string, configuredValue: T, options: { label: string; value: T }[]): IAction => {\n\t\t\tif (!enabled) {\n\t\t\t\treturn createAction({ label, enabled, run: () => { } });\n\t\t\t}\n\t\t\tconst createRunner = (value: T) => {\n\t\t\t\treturn () => {\n\t\t\t\t\tthis._configurationService.updateValue(configName, value);\n\t\t\t\t};\n\t\t\t};\n\t\t\tconst actions: IAction[] = [];\n\t\t\tfor (const option of options) {\n\t\t\t\tactions.push(createAction({\n\t\t\t\t\tlabel: option.label,\n\t\t\t\t\tchecked: configuredValue === option.value,\n\t\t\t\t\trun: createRunner(option.value)\n\t\t\t\t}));\n\t\t\t}\n\t\t\treturn createSubmenuAction(\n\t\t\t\tlabel,\n\t\t\t\tactions\n\t\t\t);\n\t\t};\n\n\t\tconst actions: IAction[] = [];\n\t\tactions.push(createAction({\n\t\t\tlabel: nls.localize('context.minimap.minimap', \"Minimap\"),\n\t\t\tchecked: minimapOptions.enabled,\n\t\t\trun: () => {\n\t\t\t\tthis._configurationService.updateValue(`editor.minimap.enabled`, !minimapOptions.enabled);\n\t\t\t}\n\t\t}));\n\t\tactions.push(new Separator());\n\t\tactions.push(createAction({\n\t\t\tlabel: nls.localize('context.minimap.renderCharacters', \"Render Characters\"),\n\t\t\tenabled: minimapOptions.enabled,\n\t\t\tchecked: minimapOptions.renderCharacters,\n\t\t\trun: () => {\n\t\t\t\tthis._configurationService.updateValue(`editor.minimap.renderCharacters`, !minimapOptions.renderCharacters);\n\t\t\t}\n\t\t}));\n\t\tactions.push(createEnumAction<'proportional' | 'fill' | 'fit'>(\n\t\t\tnls.localize('context.minimap.size', \"Vertical size\"),\n\t\t\tminimapOptions.enabled,\n\t\t\t'editor.minimap.size',\n\t\t\tminimapOptions.size,\n\t\t\t[{\n\t\t\t\tlabel: nls.localize('context.minimap.size.proportional', \"Proportional\"),\n\t\t\t\tvalue: 'proportional'\n\t\t\t}, {\n\t\t\t\tlabel: nls.localize('context.minimap.size.fill', \"Fill\"),\n\t\t\t\tvalue: 'fill'\n\t\t\t}, {\n\t\t\t\tlabel: nls.localize('context.minimap.size.fit', \"Fit\"),\n\t\t\t\tvalue: 'fit'\n\t\t\t}]\n\t\t));\n\t\tactions.push(createEnumAction<'always' | 'mouseover'>(\n\t\t\tnls.localize('context.minimap.slider', \"Slider\"),\n\t\t\tminimapOptions.enabled,\n\t\t\t'editor.minimap.showSlider',\n\t\t\tminimapOptions.showSlider,\n\t\t\t[{\n\t\t\t\tlabel: nls.localize('context.minimap.slider.mouseover', \"Mouse Over\"),\n\t\t\t\tvalue: 'mouseover'\n\t\t\t}, {\n\t\t\t\tlabel: nls.localize('context.minimap.slider.always', \"Always\"),\n\t\t\t\tvalue: 'always'\n\t\t\t}]\n\t\t));\n\t\tactions.push(createEnumAction<'right' | 'left'>(\n\t\t\tnls.localize('context.minimap.side', \"Side\"),\n\t\t\tminimapOptions.enabled,\n\t\t\t'editor.minimap.side',\n\t\t\tminimapOptions.side,\n\t\t\t[{\n\t\t\t\tlabel: nls.localize('context.minimap.side.right', \"Right\"),\n\t\t\t\tvalue: 'right'\n\t\t\t}, {\n\t\t\t\tlabel: nls.localize('context.minimap.side.left', \"Left\"),\n\t\t\t\tvalue: 'left'\n\t\t\t}]\n\t\t));\n\n\t\tconst useShadowDOM = this._editor.getOption(EditorOption.useShadowDOM) && !isIOS; // Do not use shadow dom on IOS #122035\n\t\tthis._contextMenuIsBeingShownCount++;\n\t\tthis._contextMenuService.showContextMenu({\n\t\t\tdomForShadowRoot: useShadowDOM ? this._editor.getDomNode() : undefined,\n\t\t\tuseWindowContainerForShadowRoot: useShadowDOM && this._editor.getOption(EditorOption.fixedOverflowWidgets),\n\t\t\tgetAnchor: () => anchor,\n\t\t\tgetActions: () => actions,\n\t\t\tonHide: (wasCancelled: boolean) => {\n\t\t\t\tthis._contextMenuIsBeingShownCount--;\n\t\t\t\tthis._editor.focus();\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _keybindingFor(action: IAction): ResolvedKeybinding | undefined {\n\t\treturn this._keybindingService.lookupKeybinding(action.id);\n\t}\n\n\tpublic dispose(): void {\n\t\tif (this._contextMenuIsBeingShownCount > 0) {\n\t\t\tthis._contextViewService.hideContextView();\n\t\t}\n\n\t\tthis._toDispose.dispose();\n\t}\n}\n\nclass ShowContextMenu extends EditorAction {\n\n\tconstructor() {\n\t\tsuper({\n\t\t\tid: 'editor.action.showContextMenu',\n\t\t\tlabel: nls.localize2('action.showContextMenu.label', \"Show Editor Context Menu\"),\n\t\t\tprecondition: undefined,\n\t\t\tkbOpts: {\n\t\t\t\tkbExpr: EditorContextKeys.textInputFocus,\n\t\t\t\tprimary: KeyMod.Shift | KeyCode.F10,\n\t\t\t\tweight: KeybindingWeight.EditorContrib\n\t\t\t}\n\t\t});\n\t}\n\n\tpublic run(accessor: ServicesAccessor, editor: ICodeEditor): void {\n\t\tContextMenuController.get(editor)?.showContextMenu();\n\t}\n}\n\nregisterEditorContribution(ContextMenuController.ID, ContextMenuController, EditorContributionInstantiation.BeforeFirstInteraction);\nregisterEditorAction(ShowContextMenu);\n"]}
|
|
@@ -100,7 +100,7 @@ export class CursorUndo extends EditorAction {
|
|
|
100
100
|
constructor() {
|
|
101
101
|
super({
|
|
102
102
|
id: 'cursorUndo',
|
|
103
|
-
label: nls.localize2(
|
|
103
|
+
label: nls.localize2(972, "Cursor Undo"),
|
|
104
104
|
precondition: undefined,
|
|
105
105
|
kbOpts: {
|
|
106
106
|
kbExpr: EditorContextKeys.textInputFocus,
|
|
@@ -117,7 +117,7 @@ export class CursorRedo extends EditorAction {
|
|
|
117
117
|
constructor() {
|
|
118
118
|
super({
|
|
119
119
|
id: 'cursorRedo',
|
|
120
|
-
label: nls.localize2(
|
|
120
|
+
label: nls.localize2(973, "Cursor Redo"),
|
|
121
121
|
precondition: undefined
|
|
122
122
|
});
|
|
123
123
|
}
|
|
@@ -51,7 +51,7 @@ registerEditorAction(class PasteAsAction extends EditorAction {
|
|
|
51
51
|
properties: {
|
|
52
52
|
kind: {
|
|
53
53
|
type: 'string',
|
|
54
|
-
description: nls.localize(
|
|
54
|
+
description: nls.localize(974, "The kind of the paste edit to try pasting with.\nIf there are multiple edits for this kind, the editor will show a picker. If there are no edits of this kind, the editor will show an error message."),
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
},
|
|
@@ -61,7 +61,7 @@ registerEditorAction(class PasteAsAction extends EditorAction {
|
|
|
61
61
|
properties: {
|
|
62
62
|
preferences: {
|
|
63
63
|
type: 'array',
|
|
64
|
-
description: nls.localize(
|
|
64
|
+
description: nls.localize(975, "List of preferred paste edit kind to try applying.\nThe first edit matching the preferences will be applied."),
|
|
65
65
|
items: { type: 'string' }
|
|
66
66
|
}
|
|
67
67
|
},
|
|
@@ -71,7 +71,7 @@ registerEditorAction(class PasteAsAction extends EditorAction {
|
|
|
71
71
|
constructor() {
|
|
72
72
|
super({
|
|
73
73
|
id: pasteAsCommandId,
|
|
74
|
-
label: nls.localize2(
|
|
74
|
+
label: nls.localize2(976, "Paste As..."),
|
|
75
75
|
precondition: EditorContextKeys.writable,
|
|
76
76
|
metadata: {
|
|
77
77
|
description: 'Paste as',
|
|
@@ -100,7 +100,7 @@ registerEditorAction(class extends EditorAction {
|
|
|
100
100
|
constructor() {
|
|
101
101
|
super({
|
|
102
102
|
id: 'editor.action.pasteAsText',
|
|
103
|
-
label: nls.localize2(
|
|
103
|
+
label: nls.localize2(977, "Paste as Text"),
|
|
104
104
|
precondition: EditorContextKeys.writable,
|
|
105
105
|
canTriggerInlineEdits: true,
|
|
106
106
|
});
|
|
@@ -39,10 +39,11 @@ import { InlineProgressManager } from '../../inlineProgress/browser/inlineProgre
|
|
|
39
39
|
import { MessageController } from '../../message/browser/messageController.js';
|
|
40
40
|
import { DefaultTextPasteOrDropEditProvider } from './defaultProviders.js';
|
|
41
41
|
import { createCombinedWorkspaceEdit, sortEditsByYieldTo } from './edit.js';
|
|
42
|
+
import { PasteEditSession } from './pasteEditSession.js';
|
|
42
43
|
import { PostEditWidgetManager } from './postEditWidget.js';
|
|
43
44
|
export const changePasteTypeCommandId = 'editor.changePasteType';
|
|
44
45
|
export const pasteAsPreferenceConfig = 'editor.pasteAs.preferences';
|
|
45
|
-
export const pasteWidgetVisibleCtx = new RawContextKey('pasteWidgetVisible', false, localize(
|
|
46
|
+
export const pasteWidgetVisibleCtx = new RawContextKey('pasteWidgetVisible', false, localize(978, "Whether the paste widget is showing"));
|
|
46
47
|
const vscodeClipboardMime = 'application/vnd.code.copymetadata';
|
|
47
48
|
let CopyPasteController = class CopyPasteController extends Disposable {
|
|
48
49
|
static { CopyPasteController_1 = this; }
|
|
@@ -65,7 +66,7 @@ let CopyPasteController = class CopyPasteController extends Disposable {
|
|
|
65
66
|
this._register(editor.onWillCut(e => this.handleCopy(e)));
|
|
66
67
|
this._register(editor.onWillPaste(e => this.handlePaste(e)));
|
|
67
68
|
this._pasteProgressManager = this._register(new InlineProgressManager('pasteIntoEditor', editor, instantiationService));
|
|
68
|
-
this._postPasteWidgetManager = this._register(instantiationService.createInstance(PostEditWidgetManager, 'pasteIntoEditor', editor, pasteWidgetVisibleCtx, { id: changePasteTypeCommandId, label: localize(
|
|
69
|
+
this._postPasteWidgetManager = this._register(instantiationService.createInstance(PostEditWidgetManager, 'pasteIntoEditor', editor, pasteWidgetVisibleCtx, { id: changePasteTypeCommandId, label: localize(979, "Show paste options...") }, () => CopyPasteController_1._configureDefaultAction ? [CopyPasteController_1._configureDefaultAction] : []));
|
|
69
70
|
}
|
|
70
71
|
changePasteType() {
|
|
71
72
|
this._postPasteWidgetManager.tryShowSelector();
|
|
@@ -86,7 +87,7 @@ let CopyPasteController = class CopyPasteController extends Disposable {
|
|
|
86
87
|
this._postPasteWidgetManager.clear();
|
|
87
88
|
}
|
|
88
89
|
isPasteAsEnabled() {
|
|
89
|
-
return this._editor.getOption(
|
|
90
|
+
return this._editor.getOption(99 /* EditorOption.pasteAs */).enabled;
|
|
90
91
|
}
|
|
91
92
|
async finishedPaste() {
|
|
92
93
|
await this._currentPasteOperation;
|
|
@@ -112,6 +113,7 @@ let CopyPasteController = class CopyPasteController extends Disposable {
|
|
|
112
113
|
const defaultPastePayload = {
|
|
113
114
|
multicursorText: e.dataToCopy.multicursorText ?? null,
|
|
114
115
|
pasteOnNewLine: e.dataToCopy.isFromEmptySelection,
|
|
116
|
+
isBlock: e.dataToCopy.isBlock,
|
|
115
117
|
mode: null
|
|
116
118
|
};
|
|
117
119
|
const providers = this._languageFeaturesService.documentPasteEditProvider
|
|
@@ -161,7 +163,7 @@ let CopyPasteController = class CopyPasteController extends Disposable {
|
|
|
161
163
|
if (!selections?.length || !model) {
|
|
162
164
|
return;
|
|
163
165
|
}
|
|
164
|
-
if (this._editor.getOption(
|
|
166
|
+
if (this._editor.getOption(106 /* EditorOption.readOnly */) // Never enabled if editor is readonly.
|
|
165
167
|
|| (!this.isPasteAsEnabled() && !this._pasteAsActionContext) // Or feature disabled (but still enable if paste was explicitly requested)
|
|
166
168
|
) {
|
|
167
169
|
return;
|
|
@@ -214,9 +216,9 @@ let CopyPasteController = class CopyPasteController extends Disposable {
|
|
|
214
216
|
const kindLabel = 'only' in preference
|
|
215
217
|
? preference.only.value
|
|
216
218
|
: 'preferences' in preference
|
|
217
|
-
? (preference.preferences.length ? preference.preferences.map(preference => preference.value).join(', ') : localize(
|
|
219
|
+
? (preference.preferences.length ? preference.preferences.map(preference => preference.value).join(', ') : localize(980, "empty"))
|
|
218
220
|
: preference.providerId;
|
|
219
|
-
MessageController.get(this._editor)?.showMessage(localize(
|
|
221
|
+
MessageController.get(this._editor)?.showMessage(localize(981, "No paste edits for '{0}' found", kindLabel), selections[0].getStartPosition());
|
|
220
222
|
}
|
|
221
223
|
doPasteInline(allProviders, selections, dataTransfer, metadata, clipboardEvent) {
|
|
222
224
|
this._logService.trace('CopyPasteController#doPasteInline');
|
|
@@ -233,7 +235,7 @@ let CopyPasteController = class CopyPasteController extends Disposable {
|
|
|
233
235
|
const model = editor.getModel();
|
|
234
236
|
const disposables = new DisposableStore();
|
|
235
237
|
const cts = disposables.add(new CancellationTokenSource(pToken));
|
|
236
|
-
disposables.add(editorStateCts.token.onCancellationRequested(() => cts.cancel()));
|
|
238
|
+
const editorStateListener = disposables.add(editorStateCts.token.onCancellationRequested(() => cts.cancel()));
|
|
237
239
|
const token = cts.token;
|
|
238
240
|
try {
|
|
239
241
|
await this.mergeInDataFromCopy(allProviders, dataTransfer, metadata, token);
|
|
@@ -249,8 +251,7 @@ let CopyPasteController = class CopyPasteController extends Disposable {
|
|
|
249
251
|
const context = {
|
|
250
252
|
triggerKind: DocumentPasteTriggerKind.Automatic,
|
|
251
253
|
};
|
|
252
|
-
const editSession = await this.getPasteEdits(supportedProviders, dataTransfer, model, selections, context, token);
|
|
253
|
-
disposables.add(editSession);
|
|
254
|
+
const editSession = disposables.add(await this.getPasteEdits(supportedProviders, dataTransfer, model, selections, context, token));
|
|
254
255
|
if (token.isCancellationRequested) {
|
|
255
256
|
return;
|
|
256
257
|
}
|
|
@@ -259,14 +260,16 @@ let CopyPasteController = class CopyPasteController extends Disposable {
|
|
|
259
260
|
return this.applyDefaultPasteHandler(dataTransfer, metadata, token, clipboardEvent);
|
|
260
261
|
}
|
|
261
262
|
if (editSession.edits.length) {
|
|
262
|
-
const canShowWidget = editor.getOption(
|
|
263
|
-
|
|
263
|
+
const canShowWidget = editor.getOption(99 /* EditorOption.pasteAs */).showPasteSelector === 'afterPaste';
|
|
264
|
+
// Applying the paste changes editor state itself. The widget manager handles cancellation during resolve.
|
|
265
|
+
disposables.delete(editorStateListener);
|
|
266
|
+
return await this._postPasteWidgetManager.applyEditAndShowIfNeeded(selections, { activeEditIndex: this.getInitialActiveEditIndex(model, editSession.edits), allEdits: editSession.edits }, canShowWidget, async (edit, resolveToken) => {
|
|
264
267
|
if (!edit.provider.resolveDocumentPasteEdit) {
|
|
265
268
|
return edit;
|
|
266
269
|
}
|
|
267
270
|
const resolveP = edit.provider.resolveDocumentPasteEdit(edit, resolveToken);
|
|
268
271
|
const showP = new DeferredPromise();
|
|
269
|
-
const resolved = await this._pasteProgressManager.showWhile(selections[0].getEndPosition(), localize(
|
|
272
|
+
const resolved = await this._pasteProgressManager.showWhile(selections[0].getEndPosition(), localize(982, "Resolving paste edit for '{0}'. Click to cancel", edit.title), raceCancellation(Promise.race([showP.p, resolveP]), resolveToken), {
|
|
270
273
|
cancel: () => showP.cancel()
|
|
271
274
|
}, 0);
|
|
272
275
|
if (resolved) {
|
|
@@ -274,7 +277,7 @@ let CopyPasteController = class CopyPasteController extends Disposable {
|
|
|
274
277
|
edit.additionalEdit = resolved.additionalEdit;
|
|
275
278
|
}
|
|
276
279
|
return edit;
|
|
277
|
-
}, token);
|
|
280
|
+
}, token, editSession);
|
|
278
281
|
}
|
|
279
282
|
await this.applyDefaultPasteHandler(dataTransfer, metadata, token, clipboardEvent);
|
|
280
283
|
}
|
|
@@ -285,7 +288,7 @@ let CopyPasteController = class CopyPasteController extends Disposable {
|
|
|
285
288
|
}
|
|
286
289
|
}
|
|
287
290
|
});
|
|
288
|
-
this._pasteProgressManager.showWhile(selections[0].getEndPosition(), localize(
|
|
291
|
+
this._pasteProgressManager.showWhile(selections[0].getEndPosition(), localize(983, "Running paste handlers. Click to cancel and do basic paste"), p, {
|
|
289
292
|
cancel: async () => {
|
|
290
293
|
p.cancel();
|
|
291
294
|
if (editorStateCts.token.isCancellationRequested) {
|
|
@@ -323,28 +326,26 @@ let CopyPasteController = class CopyPasteController extends Disposable {
|
|
|
323
326
|
triggerKind: DocumentPasteTriggerKind.PasteAs,
|
|
324
327
|
only: preference && 'only' in preference ? preference.only : undefined,
|
|
325
328
|
};
|
|
326
|
-
|
|
329
|
+
const editSession = disposables.add(await this.getPasteEdits(supportedProviders, dataTransfer, model, selections, context, tokenSource.token));
|
|
327
330
|
if (tokenSource.token.isCancellationRequested) {
|
|
328
331
|
return;
|
|
329
332
|
}
|
|
330
333
|
// Filter out any edits that don't match the requested kind
|
|
334
|
+
let edits = editSession.edits;
|
|
331
335
|
if (preference) {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
}),
|
|
344
|
-
dispose: editSession.dispose
|
|
345
|
-
};
|
|
336
|
+
edits = edits.filter(edit => {
|
|
337
|
+
if ('only' in preference) {
|
|
338
|
+
return preference.only.contains(edit.kind);
|
|
339
|
+
}
|
|
340
|
+
else if ('preferences' in preference) {
|
|
341
|
+
return preference.preferences.some(preference => preference.contains(edit.kind));
|
|
342
|
+
}
|
|
343
|
+
else {
|
|
344
|
+
return preference.providerId === edit.provider.id;
|
|
345
|
+
}
|
|
346
|
+
});
|
|
346
347
|
}
|
|
347
|
-
if (!
|
|
348
|
+
if (!edits.length) {
|
|
348
349
|
if (preference) {
|
|
349
350
|
this.showPasteAsNoEditMessage(selections, preference);
|
|
350
351
|
}
|
|
@@ -352,16 +353,16 @@ let CopyPasteController = class CopyPasteController extends Disposable {
|
|
|
352
353
|
}
|
|
353
354
|
let pickedEdit;
|
|
354
355
|
if (preference) {
|
|
355
|
-
pickedEdit =
|
|
356
|
+
pickedEdit = edits.at(0);
|
|
356
357
|
}
|
|
357
358
|
else {
|
|
358
359
|
const configureDefaultItem = {
|
|
359
360
|
id: 'editor.pasteAs.default',
|
|
360
|
-
label: localize(
|
|
361
|
+
label: localize(984, "Configure default paste action"),
|
|
361
362
|
edit: undefined,
|
|
362
363
|
};
|
|
363
364
|
const selected = await this._quickInputService.pick([
|
|
364
|
-
...
|
|
365
|
+
...edits.map((edit) => ({
|
|
365
366
|
label: edit.title,
|
|
366
367
|
description: edit.kind?.value,
|
|
367
368
|
edit,
|
|
@@ -374,7 +375,7 @@ let CopyPasteController = class CopyPasteController extends Disposable {
|
|
|
374
375
|
}
|
|
375
376
|
] : [])
|
|
376
377
|
], {
|
|
377
|
-
placeHolder: localize(
|
|
378
|
+
placeHolder: localize(985, "Select Paste Action"),
|
|
378
379
|
});
|
|
379
380
|
if (selected === configureDefaultItem) {
|
|
380
381
|
CopyPasteController_1._configureDefaultAction?.run();
|
|
@@ -397,7 +398,7 @@ let CopyPasteController = class CopyPasteController extends Disposable {
|
|
|
397
398
|
});
|
|
398
399
|
this._progressService.withProgress({
|
|
399
400
|
location: 10 /* ProgressLocation.Window */,
|
|
400
|
-
title: localize(
|
|
401
|
+
title: localize(986, "Running paste handlers"),
|
|
401
402
|
}, () => p);
|
|
402
403
|
}
|
|
403
404
|
setCopyMetadata(clipboardData, metadata) {
|
|
@@ -422,6 +423,7 @@ let CopyPasteController = class CopyPasteController extends Disposable {
|
|
|
422
423
|
mode: e.metadata.mode,
|
|
423
424
|
multicursorText: e.metadata.multicursorText ?? null,
|
|
424
425
|
pasteOnNewLine: !!e.metadata.isFromEmptySelection,
|
|
426
|
+
isBlock: !!e.metadata.isBlock,
|
|
425
427
|
},
|
|
426
428
|
};
|
|
427
429
|
}
|
|
@@ -478,10 +480,7 @@ let CopyPasteController = class CopyPasteController extends Disposable {
|
|
|
478
480
|
const edits = coalesce(results ?? []).flat().filter(edit => {
|
|
479
481
|
return !context.only || context.only.contains(edit.kind);
|
|
480
482
|
});
|
|
481
|
-
return
|
|
482
|
-
edits: sortEditsByYieldTo(edits),
|
|
483
|
-
dispose: () => disposables.dispose()
|
|
484
|
-
};
|
|
483
|
+
return new PasteEditSession(sortEditsByYieldTo(edits), disposables);
|
|
485
484
|
}
|
|
486
485
|
async applyDefaultPasteHandler(dataTransfer, metadata, token, clipboardEvent) {
|
|
487
486
|
const textDataTransfer = dataTransfer.get(Mimes.text) ?? dataTransfer.get('text');
|
|
@@ -494,6 +493,7 @@ let CopyPasteController = class CopyPasteController extends Disposable {
|
|
|
494
493
|
text,
|
|
495
494
|
pasteOnNewLine: metadata?.defaultPastePayload.pasteOnNewLine ?? false,
|
|
496
495
|
multicursorText: metadata?.defaultPastePayload.multicursorText ?? null,
|
|
496
|
+
isBlock: !!metadata?.defaultPastePayload.isBlock,
|
|
497
497
|
mode: null,
|
|
498
498
|
};
|
|
499
499
|
this._logService.trace('CopyPasteController#applyDefaultPasteHandler for id : ', metadata?.id);
|