monaco-editor-core 0.55.0-dev-20251014 → 0.55.0-dev-20251016
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 +9 -0
- 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 +9 -0
- package/esm/nls.messages.pt-br.js +9 -0
- package/esm/nls.messages.ru.js +2 -2
- package/esm/nls.messages.tr.js +9 -0
- package/esm/nls.messages.zh-cn.js +2 -2
- package/esm/nls.messages.zh-tw.js +2 -2
- package/esm/nls.metadata.json +10 -0
- package/esm/vs/base/browser/canIUse.js +0 -1
- package/esm/vs/base/browser/canIUse.js.map +1 -1
- package/esm/vs/base/browser/domSanitize.js +31 -23
- package/esm/vs/base/browser/domSanitize.js.map +1 -1
- package/esm/vs/base/browser/dompurify/dompurify.js +188 -385
- package/esm/vs/base/browser/markdownRenderer.js +6 -1
- package/esm/vs/base/browser/markdownRenderer.js.map +1 -1
- package/esm/vs/base/browser/trustedTypes.js.map +1 -1
- package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/esm/vs/base/browser/ui/toggle/toggle.js +6 -0
- package/esm/vs/base/browser/ui/toggle/toggle.js.map +1 -1
- package/esm/vs/base/common/codiconsLibrary.js +1 -0
- package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
- package/esm/vs/base/common/objects.js +0 -1
- package/esm/vs/base/common/objects.js.map +1 -1
- package/esm/vs/editor/browser/controller/mouseTarget.js +2 -1
- package/esm/vs/editor/browser/controller/mouseTarget.js.map +1 -1
- package/esm/vs/editor/browser/coreCommands.js +4 -2
- package/esm/vs/editor/browser/coreCommands.js.map +1 -1
- package/esm/vs/editor/browser/services/abstractCodeEditorService.js +5 -0
- package/esm/vs/editor/browser/services/abstractCodeEditorService.js.map +1 -1
- package/esm/vs/editor/browser/services/codeEditorService.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/copySelection.js +104 -0
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/copySelection.js.map +1 -0
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.js +3 -3
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js +25 -24
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/diffEditor.contribution.js +5 -5
- package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +7 -3
- package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +7 -7
- package/esm/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +2 -2
- 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/diffEditor/style.css +11 -0
- package/esm/vs/editor/browser/widget/multiDiffEditor/colors.js +3 -3
- package/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js +2 -2
- package/esm/vs/editor/common/config/editorConfigurationSchema.js +54 -54
- package/esm/vs/editor/common/config/editorOptions.js +406 -406
- package/esm/vs/editor/common/core/editorColorRegistry.js +68 -68
- package/esm/vs/editor/common/cursor/cursorMoveCommands.js +10 -1
- package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
- package/esm/vs/editor/common/editorContextKeys.js +46 -46
- 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/standaloneStrings.js +10 -10
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
- package/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
- package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +6 -6
- 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 +17 -17
- 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/lightBulbWidget.js +9 -9
- package/esm/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
- 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/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
- package/esm/vs/editor/contrib/comment/browser/comment.js +6 -6
- package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +13 -14
- 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 +9 -9
- 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/postEditWidget.js +2 -2
- package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
- package/esm/vs/editor/contrib/find/browser/findController.js +16 -16
- package/esm/vs/editor/contrib/find/browser/findWidget.js +26 -26
- package/esm/vs/editor/contrib/folding/browser/folding.js +20 -20
- package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
- package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js.map +1 -1
- 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/goToDefinitionAtPosition.js +1 -1
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +3 -3
- 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/hoverActionIds.js +2 -2
- package/esm/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +9 -9
- package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +5 -5
- 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/inlayHintsHover.js +8 -8
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +19 -19
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +12 -12
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +15 -10
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +6 -6
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +1 -1
- 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 +47 -37
- package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js.map +1 -1
- package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
- package/esm/vs/editor/contrib/links/browser/links.js +10 -10
- package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
- package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
- 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/quickAccess/browser/gotoLineQuickAccess.js +56 -10
- package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js.map +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
- package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
- 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/smartSelect/browser/smartSelect.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
- 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/stickyScrollWidget.js +2 -2
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggest.js +8 -8
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js +10 -10
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +17 -17
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/wordContextKey.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 +24 -24
- package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
- package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
- package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -3
- package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +1 -1
- package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
- package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
- package/esm/vs/platform/actionWidget/browser/actionList.js +4 -4
- package/esm/vs/platform/actionWidget/browser/actionWidget.js +7 -7
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +5 -5
- package/esm/vs/platform/actions/browser/toolbar.js +2 -2
- package/esm/vs/platform/actions/common/actions.js +0 -1
- package/esm/vs/platform/actions/common/actions.js.map +1 -1
- package/esm/vs/platform/actions/common/menuService.js +2 -2
- package/esm/vs/platform/configuration/common/configurationRegistry.js +10 -10
- package/esm/vs/platform/contextkey/browser/contextKeyService.js +1 -1
- package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
- package/esm/vs/platform/contextkey/common/contextkeys.js +9 -9
- package/esm/vs/platform/contextkey/common/scanner.js +5 -5
- package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
- package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
- package/esm/vs/platform/list/browser/listService.js +27 -27
- package/esm/vs/platform/markers/common/markerService.js +2 -2
- package/esm/vs/platform/markers/common/markers.js +6 -6
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +7 -7
- package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +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 +6 -6
- package/esm/vs/platform/quickinput/browser/quickInputList.js +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/common/quickInput.js.map +1 -1
- package/esm/vs/platform/theme/common/colorUtils.js +2 -2
- package/esm/vs/platform/theme/common/colors/baseColors.js +17 -17
- package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
- package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
- package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
- 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 +11 -11
- package/esm/vs/platform/theme/common/colors/miscColors.js +15 -15
- package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
- 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/package.json +3 -3
- package/version.txt +1 -1
|
@@ -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,CA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B,CAAA;IACnB,WAAA,kBAAkB,CAAA;IAClB,WAAA,kBAAkB,CAAA;IAClB,WAAA,YAAY,CAAA;IACZ,WAAA,qBAAqB,CAAA;IACrB,WAAA,wBAAwB,CAAA;GApBd,qBAAqB,CA0VjC;;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\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\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\t\tconst customActionViewItem = <any>action;\n\t\t\t\tif (typeof customActionViewItem.getActionViewItem === 'function') {\n\t\t\t\t\treturn customActionViewItem.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\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\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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AAA,mBAAmB,CAAA;IACnB,WAAA,kBAAkB,CAAA;IAClB,WAAA,kBAAkB,CAAA;IAClB,WAAA,YAAY,CAAA;IACZ,WAAA,qBAAqB,CAAA;IACrB,WAAA,wBAAwB,CAAA;GApBd,qBAAqB,CAyVjC;;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\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\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\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(907, "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(908, "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(909, "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(910, "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(911, "Paste As..."),
|
|
75
75
|
precondition: EditorContextKeys.writable,
|
|
76
76
|
metadata: {
|
|
77
77
|
description: 'Paste as',
|
|
@@ -99,7 +99,7 @@ registerEditorAction(class extends EditorAction {
|
|
|
99
99
|
constructor() {
|
|
100
100
|
super({
|
|
101
101
|
id: 'editor.action.pasteAsText',
|
|
102
|
-
label: nls.localize2(
|
|
102
|
+
label: nls.localize2(912, "Paste as Text"),
|
|
103
103
|
precondition: EditorContextKeys.writable,
|
|
104
104
|
});
|
|
105
105
|
}
|
|
@@ -47,7 +47,7 @@ import { createCombinedWorkspaceEdit, sortEditsByYieldTo } from './edit.js';
|
|
|
47
47
|
import { PostEditWidgetManager } from './postEditWidget.js';
|
|
48
48
|
export const changePasteTypeCommandId = 'editor.changePasteType';
|
|
49
49
|
export const pasteAsPreferenceConfig = 'editor.pasteAs.preferences';
|
|
50
|
-
export const pasteWidgetVisibleCtx = new RawContextKey('pasteWidgetVisible', false, localize(
|
|
50
|
+
export const pasteWidgetVisibleCtx = new RawContextKey('pasteWidgetVisible', false, localize(913, "Whether the paste widget is showing"));
|
|
51
51
|
const vscodeClipboardMime = 'application/vnd.code.copymetadata';
|
|
52
52
|
let CopyPasteController = class CopyPasteController extends Disposable {
|
|
53
53
|
static { CopyPasteController_1 = this; }
|
|
@@ -71,7 +71,7 @@ let CopyPasteController = class CopyPasteController extends Disposable {
|
|
|
71
71
|
this._register(addDisposableListener(container, 'cut', e => this.handleCopy(e)));
|
|
72
72
|
this._register(addDisposableListener(container, 'paste', e => this.handlePaste(e), true));
|
|
73
73
|
this._pasteProgressManager = this._register(new InlineProgressManager('pasteIntoEditor', editor, instantiationService));
|
|
74
|
-
this._postPasteWidgetManager = this._register(instantiationService.createInstance(PostEditWidgetManager, 'pasteIntoEditor', editor, pasteWidgetVisibleCtx, { id: changePasteTypeCommandId, label: localize(
|
|
74
|
+
this._postPasteWidgetManager = this._register(instantiationService.createInstance(PostEditWidgetManager, 'pasteIntoEditor', editor, pasteWidgetVisibleCtx, { id: changePasteTypeCommandId, label: localize(914, "Show paste options...") }, () => CopyPasteController_1._configureDefaultAction ? [CopyPasteController_1._configureDefaultAction] : []));
|
|
75
75
|
}
|
|
76
76
|
changePasteType() {
|
|
77
77
|
this._postPasteWidgetManager.tryShowSelector();
|
|
@@ -245,9 +245,9 @@ let CopyPasteController = class CopyPasteController extends Disposable {
|
|
|
245
245
|
const kindLabel = 'only' in preference
|
|
246
246
|
? preference.only.value
|
|
247
247
|
: 'preferences' in preference
|
|
248
|
-
? (preference.preferences.length ? preference.preferences.map(preference => preference.value).join(', ') : localize(
|
|
248
|
+
? (preference.preferences.length ? preference.preferences.map(preference => preference.value).join(', ') : localize(915, "empty"))
|
|
249
249
|
: preference.providerId;
|
|
250
|
-
MessageController.get(this._editor)?.showMessage(localize(
|
|
250
|
+
MessageController.get(this._editor)?.showMessage(localize(916, "No paste edits for '{0}' found", kindLabel), selections[0].getStartPosition());
|
|
251
251
|
}
|
|
252
252
|
doPasteInline(allProviders, selections, dataTransfer, metadata, clipboardEvent) {
|
|
253
253
|
this._logService.trace('CopyPasteController#doPasteInline');
|
|
@@ -297,7 +297,7 @@ let CopyPasteController = class CopyPasteController extends Disposable {
|
|
|
297
297
|
}
|
|
298
298
|
const resolveP = edit.provider.resolveDocumentPasteEdit(edit, resolveToken);
|
|
299
299
|
const showP = new DeferredPromise();
|
|
300
|
-
const resolved = await this._pasteProgressManager.showWhile(selections[0].getEndPosition(), localize(
|
|
300
|
+
const resolved = await this._pasteProgressManager.showWhile(selections[0].getEndPosition(), localize(917, "Resolving paste edit for '{0}'. Click to cancel", edit.title), raceCancellation(Promise.race([showP.p, resolveP]), resolveToken), {
|
|
301
301
|
cancel: () => showP.cancel()
|
|
302
302
|
}, 0);
|
|
303
303
|
if (resolved) {
|
|
@@ -316,7 +316,7 @@ let CopyPasteController = class CopyPasteController extends Disposable {
|
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
});
|
|
319
|
-
this._pasteProgressManager.showWhile(selections[0].getEndPosition(), localize(
|
|
319
|
+
this._pasteProgressManager.showWhile(selections[0].getEndPosition(), localize(918, "Running paste handlers. Click to cancel and do basic paste"), p, {
|
|
320
320
|
cancel: async () => {
|
|
321
321
|
p.cancel();
|
|
322
322
|
if (editorStateCts.token.isCancellationRequested) {
|
|
@@ -388,7 +388,7 @@ let CopyPasteController = class CopyPasteController extends Disposable {
|
|
|
388
388
|
else {
|
|
389
389
|
const configureDefaultItem = {
|
|
390
390
|
id: 'editor.pasteAs.default',
|
|
391
|
-
label: localize(
|
|
391
|
+
label: localize(919, "Configure default paste action"),
|
|
392
392
|
edit: undefined,
|
|
393
393
|
};
|
|
394
394
|
const selected = await this._quickInputService.pick([
|
|
@@ -405,7 +405,7 @@ let CopyPasteController = class CopyPasteController extends Disposable {
|
|
|
405
405
|
}
|
|
406
406
|
] : [])
|
|
407
407
|
], {
|
|
408
|
-
placeHolder: localize(
|
|
408
|
+
placeHolder: localize(920, "Select Paste Action"),
|
|
409
409
|
});
|
|
410
410
|
if (selected === configureDefaultItem) {
|
|
411
411
|
CopyPasteController_1._configureDefaultAction?.run();
|
|
@@ -428,7 +428,7 @@ let CopyPasteController = class CopyPasteController extends Disposable {
|
|
|
428
428
|
});
|
|
429
429
|
this._progressService.withProgress({
|
|
430
430
|
location: 10 /* ProgressLocation.Window */,
|
|
431
|
-
title: localize(
|
|
431
|
+
title: localize(921, "Running paste handlers"),
|
|
432
432
|
}, () => p);
|
|
433
433
|
}
|
|
434
434
|
setCopyMetadata(dataTransfer, metadata) {
|
|
@@ -72,7 +72,7 @@ export class DefaultTextPasteOrDropEditProvider extends SimplePasteAndDropProvid
|
|
|
72
72
|
const insertText = await textEntry.asString();
|
|
73
73
|
return {
|
|
74
74
|
handledMimeType: Mimes.text,
|
|
75
|
-
title: localize(
|
|
75
|
+
title: localize(922, "Insert Plain Text"),
|
|
76
76
|
insertText,
|
|
77
77
|
kind: this.kind,
|
|
78
78
|
};
|
|
@@ -105,14 +105,14 @@ class PathProvider extends SimplePasteAndDropProvider {
|
|
|
105
105
|
if (uriCount > 0) {
|
|
106
106
|
// Dropping at least one generic uri (such as https) so use most generic label
|
|
107
107
|
label = entries.length > 1
|
|
108
|
-
? localize(
|
|
109
|
-
: localize(
|
|
108
|
+
? localize(923, "Insert Uris")
|
|
109
|
+
: localize(924, "Insert Uri");
|
|
110
110
|
}
|
|
111
111
|
else {
|
|
112
112
|
// All the paths are file paths
|
|
113
113
|
label = entries.length > 1
|
|
114
|
-
? localize(
|
|
115
|
-
: localize(
|
|
114
|
+
? localize(925, "Insert Paths")
|
|
115
|
+
: localize(926, "Insert Path");
|
|
116
116
|
}
|
|
117
117
|
return {
|
|
118
118
|
handledMimeType: Mimes.uriList,
|
|
@@ -145,8 +145,8 @@ let RelativePathProvider = class RelativePathProvider extends SimplePasteAndDrop
|
|
|
145
145
|
handledMimeType: Mimes.uriList,
|
|
146
146
|
insertText: relativeUris.join(' '),
|
|
147
147
|
title: entries.length > 1
|
|
148
|
-
? localize(
|
|
149
|
-
: localize(
|
|
148
|
+
? localize(927, "Insert Relative Paths")
|
|
149
|
+
: localize(928, "Insert Relative Path"),
|
|
150
150
|
kind: this.kind,
|
|
151
151
|
};
|
|
152
152
|
}
|
|
@@ -176,7 +176,7 @@ class PasteHtmlProvider {
|
|
|
176
176
|
edits: [{
|
|
177
177
|
insertText: htmlText,
|
|
178
178
|
yieldTo: this._yieldTo,
|
|
179
|
-
title: localize(
|
|
179
|
+
title: localize(929, 'Insert HTML'),
|
|
180
180
|
kind: this.kind,
|
|
181
181
|
}],
|
|
182
182
|
};
|
|
@@ -34,7 +34,7 @@ import { sortEditsByYieldTo } from './edit.js';
|
|
|
34
34
|
import { PostEditWidgetManager } from './postEditWidget.js';
|
|
35
35
|
export const dropAsPreferenceConfig = 'editor.dropIntoEditor.preferences';
|
|
36
36
|
export const changeDropTypeCommandId = 'editor.changeDropType';
|
|
37
|
-
export const dropWidgetVisibleCtx = new RawContextKey('dropWidgetVisible', false, localize(
|
|
37
|
+
export const dropWidgetVisibleCtx = new RawContextKey('dropWidgetVisible', false, localize(930, "Whether the drop widget is showing"));
|
|
38
38
|
let DropIntoEditorController = class DropIntoEditorController extends Disposable {
|
|
39
39
|
static { DropIntoEditorController_1 = this; }
|
|
40
40
|
static { this.ID = 'editor.contrib.dropIntoEditorController'; }
|
|
@@ -48,7 +48,7 @@ let DropIntoEditorController = class DropIntoEditorController extends Disposable
|
|
|
48
48
|
this._treeViewsDragAndDropService = _treeViewsDragAndDropService;
|
|
49
49
|
this.treeItemsTransfer = LocalSelectionTransfer.getInstance();
|
|
50
50
|
this._dropProgressManager = this._register(instantiationService.createInstance(InlineProgressManager, 'dropIntoEditor', editor));
|
|
51
|
-
this._postDropWidgetManager = this._register(instantiationService.createInstance(PostEditWidgetManager, 'dropIntoEditor', editor, dropWidgetVisibleCtx, { id: changeDropTypeCommandId, label: localize(
|
|
51
|
+
this._postDropWidgetManager = this._register(instantiationService.createInstance(PostEditWidgetManager, 'dropIntoEditor', editor, dropWidgetVisibleCtx, { id: changeDropTypeCommandId, label: localize(931, "Show drop options...") }, () => DropIntoEditorController_1._configureDefaultAction ? [DropIntoEditorController_1._configureDefaultAction] : []));
|
|
52
52
|
this._register(editor.onDropIntoEditor(e => this.onDropIntoEditor(editor, e.position, e.event)));
|
|
53
53
|
}
|
|
54
54
|
clearWidgets() {
|
|
@@ -103,7 +103,7 @@ let DropIntoEditorController = class DropIntoEditorController extends Disposable
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
});
|
|
106
|
-
this._dropProgressManager.showWhile(position, localize(
|
|
106
|
+
this._dropProgressManager.showWhile(position, localize(932, "Running drop handlers. Click to cancel"), p, { cancel: () => p.cancel() });
|
|
107
107
|
DropIntoEditorController_1._currentDropOperation = p;
|
|
108
108
|
}
|
|
109
109
|
async getDropEdits(providers, model, position, dataTransfer, token) {
|
|
@@ -162,7 +162,7 @@ let PostEditWidgetManager = class PostEditWidgetManager extends Disposable {
|
|
|
162
162
|
resolvedEdit = await raceCancellationError(resolve(edit, editorStateCts.token), editorStateCts.token);
|
|
163
163
|
}
|
|
164
164
|
catch (e) {
|
|
165
|
-
return handleError(e, localize(
|
|
165
|
+
return handleError(e, localize(933, "Error resolving edit '{0}':\n{1}", edit.title, toErrorMessage(e)));
|
|
166
166
|
}
|
|
167
167
|
finally {
|
|
168
168
|
editorStateCts.dispose();
|
|
@@ -185,7 +185,7 @@ let PostEditWidgetManager = class PostEditWidgetManager extends Disposable {
|
|
|
185
185
|
editRange = model.getDecorationRange(editTrackingDecoration[0]);
|
|
186
186
|
}
|
|
187
187
|
catch (e) {
|
|
188
|
-
return handleError(e, localize(
|
|
188
|
+
return handleError(e, localize(934, "Error applying edit '{0}':\n{1}", edit.title, toErrorMessage(e)));
|
|
189
189
|
}
|
|
190
190
|
finally {
|
|
191
191
|
model.deltaDecorations(editTrackingDecoration, []);
|
|
@@ -10,7 +10,7 @@ import { createDecorator } from '../../../../platform/instantiation/common/insta
|
|
|
10
10
|
import { registerSingleton } from '../../../../platform/instantiation/common/extensions.js';
|
|
11
11
|
import { localize } from '../../../../nls.js';
|
|
12
12
|
const IEditorCancellationTokens = createDecorator('IEditorCancelService');
|
|
13
|
-
const ctxCancellableOperation = new RawContextKey('cancellableOperation', false, localize(
|
|
13
|
+
const ctxCancellableOperation = new RawContextKey('cancellableOperation', false, localize(935, 'Whether the editor runs a cancellable operation, e.g. like \'Peek References\''));
|
|
14
14
|
registerSingleton(IEditorCancellationTokens, class {
|
|
15
15
|
constructor() {
|
|
16
16
|
this._tokens = new WeakMap();
|
|
@@ -311,7 +311,7 @@ let CommonFindController = class CommonFindController extends Disposable {
|
|
|
311
311
|
replaceAll() {
|
|
312
312
|
if (this._model) {
|
|
313
313
|
if (this._editor.getModel()?.isTooLargeForHeapOperation()) {
|
|
314
|
-
this._notificationService.warn(nls.localize(
|
|
314
|
+
this._notificationService.warn(nls.localize(936, "The file is too large to perform a replace all operation."));
|
|
315
315
|
return false;
|
|
316
316
|
}
|
|
317
317
|
this._model.replaceAll();
|
|
@@ -428,7 +428,7 @@ FindController = __decorate([
|
|
|
428
428
|
export { FindController };
|
|
429
429
|
export const StartFindAction = registerMultiEditorAction(new MultiEditorAction({
|
|
430
430
|
id: FIND_IDS.StartFindAction,
|
|
431
|
-
label: nls.localize2(
|
|
431
|
+
label: nls.localize2(943, "Find"),
|
|
432
432
|
precondition: ContextKeyExpr.or(EditorContextKeys.focus, ContextKeyExpr.has('editorIsOpen')),
|
|
433
433
|
kbOpts: {
|
|
434
434
|
kbExpr: null,
|
|
@@ -438,7 +438,7 @@ export const StartFindAction = registerMultiEditorAction(new MultiEditorAction({
|
|
|
438
438
|
menuOpts: {
|
|
439
439
|
menuId: MenuId.MenubarEditMenu,
|
|
440
440
|
group: '3_find',
|
|
441
|
-
title: nls.localize(
|
|
441
|
+
title: nls.localize(937, "&&Find"),
|
|
442
442
|
order: 1
|
|
443
443
|
}
|
|
444
444
|
}));
|
|
@@ -479,7 +479,7 @@ export class StartFindWithArgsAction extends EditorAction {
|
|
|
479
479
|
constructor() {
|
|
480
480
|
super({
|
|
481
481
|
id: FIND_IDS.StartFindWithArgs,
|
|
482
|
-
label: nls.localize2(
|
|
482
|
+
label: nls.localize2(944, "Find with Arguments"),
|
|
483
483
|
precondition: undefined,
|
|
484
484
|
kbOpts: {
|
|
485
485
|
kbExpr: null,
|
|
@@ -523,7 +523,7 @@ export class StartFindWithSelectionAction extends EditorAction {
|
|
|
523
523
|
constructor() {
|
|
524
524
|
super({
|
|
525
525
|
id: FIND_IDS.StartFindWithSelection,
|
|
526
|
-
label: nls.localize2(
|
|
526
|
+
label: nls.localize2(945, "Find with Selection"),
|
|
527
527
|
precondition: undefined,
|
|
528
528
|
kbOpts: {
|
|
529
529
|
kbExpr: null,
|
|
@@ -581,7 +581,7 @@ async function matchFindAction(editor, next) {
|
|
|
581
581
|
}
|
|
582
582
|
export const NextMatchFindAction = registerMultiEditorAction(new MultiEditorAction({
|
|
583
583
|
id: FIND_IDS.NextMatchFindAction,
|
|
584
|
-
label: nls.localize2(
|
|
584
|
+
label: nls.localize2(946, "Find Next"),
|
|
585
585
|
precondition: undefined,
|
|
586
586
|
kbOpts: [{
|
|
587
587
|
kbExpr: EditorContextKeys.focus,
|
|
@@ -599,7 +599,7 @@ NextMatchFindAction.addImplementation(0, async (accessor, editor, args) => {
|
|
|
599
599
|
});
|
|
600
600
|
export const PreviousMatchFindAction = registerMultiEditorAction(new MultiEditorAction({
|
|
601
601
|
id: FIND_IDS.PreviousMatchFindAction,
|
|
602
|
-
label: nls.localize2(
|
|
602
|
+
label: nls.localize2(947, "Find Previous"),
|
|
603
603
|
precondition: undefined,
|
|
604
604
|
kbOpts: [{
|
|
605
605
|
kbExpr: EditorContextKeys.focus,
|
|
@@ -619,7 +619,7 @@ export class MoveToMatchFindAction extends EditorAction {
|
|
|
619
619
|
constructor() {
|
|
620
620
|
super({
|
|
621
621
|
id: FIND_IDS.GoToMatchFindAction,
|
|
622
|
-
label: nls.localize2(
|
|
622
|
+
label: nls.localize2(948, "Go to Match..."),
|
|
623
623
|
precondition: CONTEXT_FIND_WIDGET_VISIBLE
|
|
624
624
|
});
|
|
625
625
|
this._highlightDecorations = [];
|
|
@@ -634,14 +634,14 @@ export class MoveToMatchFindAction extends EditorAction {
|
|
|
634
634
|
const notificationService = accessor.get(INotificationService);
|
|
635
635
|
notificationService.notify({
|
|
636
636
|
severity: Severity.Warning,
|
|
637
|
-
message: nls.localize(
|
|
637
|
+
message: nls.localize(938, "No matches. Try searching for something else.")
|
|
638
638
|
});
|
|
639
639
|
return;
|
|
640
640
|
}
|
|
641
641
|
const quickInputService = accessor.get(IQuickInputService);
|
|
642
642
|
const disposables = new DisposableStore();
|
|
643
643
|
const inputBox = disposables.add(quickInputService.createInputBox());
|
|
644
|
-
inputBox.placeholder = nls.localize(
|
|
644
|
+
inputBox.placeholder = nls.localize(939, "Type a number to go to a specific match (between 1 and {0})", matchesCount);
|
|
645
645
|
const toFindMatchIndex = (value) => {
|
|
646
646
|
const index = parseInt(value);
|
|
647
647
|
if (isNaN(index)) {
|
|
@@ -668,7 +668,7 @@ export class MoveToMatchFindAction extends EditorAction {
|
|
|
668
668
|
}
|
|
669
669
|
}
|
|
670
670
|
else {
|
|
671
|
-
inputBox.validationMessage = nls.localize(
|
|
671
|
+
inputBox.validationMessage = nls.localize(940, "Please type a number between 1 and {0}", controller.getState().matchesCount);
|
|
672
672
|
this.clearDecorations(editor);
|
|
673
673
|
}
|
|
674
674
|
};
|
|
@@ -682,7 +682,7 @@ export class MoveToMatchFindAction extends EditorAction {
|
|
|
682
682
|
inputBox.hide();
|
|
683
683
|
}
|
|
684
684
|
else {
|
|
685
|
-
inputBox.validationMessage = nls.localize(
|
|
685
|
+
inputBox.validationMessage = nls.localize(941, "Please type a number between 1 and {0}", controller.getState().matchesCount);
|
|
686
686
|
}
|
|
687
687
|
}));
|
|
688
688
|
disposables.add(inputBox.onDidHide(() => {
|
|
@@ -750,7 +750,7 @@ export class NextSelectionMatchFindAction extends SelectionMatchFindAction {
|
|
|
750
750
|
constructor() {
|
|
751
751
|
super({
|
|
752
752
|
id: FIND_IDS.NextSelectionMatchFindAction,
|
|
753
|
-
label: nls.localize2(
|
|
753
|
+
label: nls.localize2(949, "Find Next Selection"),
|
|
754
754
|
precondition: undefined,
|
|
755
755
|
kbOpts: {
|
|
756
756
|
kbExpr: EditorContextKeys.focus,
|
|
@@ -767,7 +767,7 @@ export class PreviousSelectionMatchFindAction extends SelectionMatchFindAction {
|
|
|
767
767
|
constructor() {
|
|
768
768
|
super({
|
|
769
769
|
id: FIND_IDS.PreviousSelectionMatchFindAction,
|
|
770
|
-
label: nls.localize2(
|
|
770
|
+
label: nls.localize2(950, "Find Previous Selection"),
|
|
771
771
|
precondition: undefined,
|
|
772
772
|
kbOpts: {
|
|
773
773
|
kbExpr: EditorContextKeys.focus,
|
|
@@ -782,7 +782,7 @@ export class PreviousSelectionMatchFindAction extends SelectionMatchFindAction {
|
|
|
782
782
|
}
|
|
783
783
|
export const StartFindReplaceAction = registerMultiEditorAction(new MultiEditorAction({
|
|
784
784
|
id: FIND_IDS.StartFindReplaceAction,
|
|
785
|
-
label: nls.localize2(
|
|
785
|
+
label: nls.localize2(951, "Replace"),
|
|
786
786
|
precondition: ContextKeyExpr.or(EditorContextKeys.focus, ContextKeyExpr.has('editorIsOpen')),
|
|
787
787
|
kbOpts: {
|
|
788
788
|
kbExpr: null,
|
|
@@ -793,7 +793,7 @@ export const StartFindReplaceAction = registerMultiEditorAction(new MultiEditorA
|
|
|
793
793
|
menuOpts: {
|
|
794
794
|
menuId: MenuId.MenubarEditMenu,
|
|
795
795
|
group: '3_find',
|
|
796
|
-
title: nls.localize(
|
|
796
|
+
title: nls.localize(942, "&&Replace"),
|
|
797
797
|
order: 2
|
|
798
798
|
}
|
|
799
799
|
}));
|
|
@@ -27,28 +27,28 @@ import { isHighContrast } from '../../../../platform/theme/common/theme.js';
|
|
|
27
27
|
import { assertReturnsDefined } from '../../../../base/common/types.js';
|
|
28
28
|
import { defaultInputBoxStyles, defaultToggleStyles } from '../../../../platform/theme/browser/defaultStyles.js';
|
|
29
29
|
import { createInstantHoverDelegate, getDefaultHoverDelegate } from '../../../../base/browser/ui/hover/hoverDelegateFactory.js';
|
|
30
|
-
const findCollapsedIcon = registerIcon('find-collapsed', Codicon.chevronRight, nls.localize(
|
|
31
|
-
const findExpandedIcon = registerIcon('find-expanded', Codicon.chevronDown, nls.localize(
|
|
32
|
-
export const findSelectionIcon = registerIcon('find-selection', Codicon.selection, nls.localize(
|
|
33
|
-
export const findReplaceIcon = registerIcon('find-replace', Codicon.replace, nls.localize(
|
|
34
|
-
export const findReplaceAllIcon = registerIcon('find-replace-all', Codicon.replaceAll, nls.localize(
|
|
35
|
-
export const findPreviousMatchIcon = registerIcon('find-previous-match', Codicon.arrowUp, nls.localize(
|
|
36
|
-
export const findNextMatchIcon = registerIcon('find-next-match', Codicon.arrowDown, nls.localize(
|
|
37
|
-
const NLS_FIND_DIALOG_LABEL = nls.localize(
|
|
38
|
-
const NLS_FIND_INPUT_LABEL = nls.localize(
|
|
39
|
-
const NLS_FIND_INPUT_PLACEHOLDER = nls.localize(
|
|
40
|
-
const NLS_PREVIOUS_MATCH_BTN_LABEL = nls.localize(
|
|
41
|
-
const NLS_NEXT_MATCH_BTN_LABEL = nls.localize(
|
|
42
|
-
const NLS_TOGGLE_SELECTION_FIND_TITLE = nls.localize(
|
|
43
|
-
const NLS_CLOSE_BTN_LABEL = nls.localize(
|
|
44
|
-
const NLS_REPLACE_INPUT_LABEL = nls.localize(
|
|
45
|
-
const NLS_REPLACE_INPUT_PLACEHOLDER = nls.localize(
|
|
46
|
-
const NLS_REPLACE_BTN_LABEL = nls.localize(
|
|
47
|
-
const NLS_REPLACE_ALL_BTN_LABEL = nls.localize(
|
|
48
|
-
const NLS_TOGGLE_REPLACE_MODE_BTN_LABEL = nls.localize(
|
|
49
|
-
const NLS_MATCHES_COUNT_LIMIT_TITLE = nls.localize(
|
|
50
|
-
export const NLS_MATCHES_LOCATION = nls.localize(
|
|
51
|
-
export const NLS_NO_RESULTS = nls.localize(
|
|
30
|
+
const findCollapsedIcon = registerIcon('find-collapsed', Codicon.chevronRight, nls.localize(952, 'Icon to indicate that the editor find widget is collapsed.'));
|
|
31
|
+
const findExpandedIcon = registerIcon('find-expanded', Codicon.chevronDown, nls.localize(953, 'Icon to indicate that the editor find widget is expanded.'));
|
|
32
|
+
export const findSelectionIcon = registerIcon('find-selection', Codicon.selection, nls.localize(954, 'Icon for \'Find in Selection\' in the editor find widget.'));
|
|
33
|
+
export const findReplaceIcon = registerIcon('find-replace', Codicon.replace, nls.localize(955, 'Icon for \'Replace\' in the editor find widget.'));
|
|
34
|
+
export const findReplaceAllIcon = registerIcon('find-replace-all', Codicon.replaceAll, nls.localize(956, 'Icon for \'Replace All\' in the editor find widget.'));
|
|
35
|
+
export const findPreviousMatchIcon = registerIcon('find-previous-match', Codicon.arrowUp, nls.localize(957, 'Icon for \'Find Previous\' in the editor find widget.'));
|
|
36
|
+
export const findNextMatchIcon = registerIcon('find-next-match', Codicon.arrowDown, nls.localize(958, 'Icon for \'Find Next\' in the editor find widget.'));
|
|
37
|
+
const NLS_FIND_DIALOG_LABEL = nls.localize(959, "Find / Replace");
|
|
38
|
+
const NLS_FIND_INPUT_LABEL = nls.localize(960, "Find");
|
|
39
|
+
const NLS_FIND_INPUT_PLACEHOLDER = nls.localize(961, "Find");
|
|
40
|
+
const NLS_PREVIOUS_MATCH_BTN_LABEL = nls.localize(962, "Previous Match");
|
|
41
|
+
const NLS_NEXT_MATCH_BTN_LABEL = nls.localize(963, "Next Match");
|
|
42
|
+
const NLS_TOGGLE_SELECTION_FIND_TITLE = nls.localize(964, "Find in Selection");
|
|
43
|
+
const NLS_CLOSE_BTN_LABEL = nls.localize(965, "Close");
|
|
44
|
+
const NLS_REPLACE_INPUT_LABEL = nls.localize(966, "Replace");
|
|
45
|
+
const NLS_REPLACE_INPUT_PLACEHOLDER = nls.localize(967, "Replace");
|
|
46
|
+
const NLS_REPLACE_BTN_LABEL = nls.localize(968, "Replace");
|
|
47
|
+
const NLS_REPLACE_ALL_BTN_LABEL = nls.localize(969, "Replace All");
|
|
48
|
+
const NLS_TOGGLE_REPLACE_MODE_BTN_LABEL = nls.localize(970, "Toggle Replace");
|
|
49
|
+
const NLS_MATCHES_COUNT_LIMIT_TITLE = nls.localize(971, "Only the first {0} results are highlighted, but all find operations work on the entire text.", MATCHES_LIMIT);
|
|
50
|
+
export const NLS_MATCHES_LOCATION = nls.localize(972, "{0} of {1}");
|
|
51
|
+
export const NLS_NO_RESULTS = nls.localize(973, "No results");
|
|
52
52
|
const FIND_WIDGET_INITIAL_WIDTH = 419;
|
|
53
53
|
const PART_WIDTH = 275;
|
|
54
54
|
const FIND_INPUT_AREA_WIDTH = PART_WIDTH - 54;
|
|
@@ -325,11 +325,11 @@ export class FindWidget extends Widget {
|
|
|
325
325
|
_getAriaLabel(label, currentMatch, searchString) {
|
|
326
326
|
if (label === NLS_NO_RESULTS) {
|
|
327
327
|
return searchString === ''
|
|
328
|
-
? nls.localize(
|
|
329
|
-
: nls.localize(
|
|
328
|
+
? nls.localize(974, "{0} found", label)
|
|
329
|
+
: nls.localize(975, "{0} found for '{1}'", label, searchString);
|
|
330
330
|
}
|
|
331
331
|
if (currentMatch) {
|
|
332
|
-
const ariaLabel = nls.localize(
|
|
332
|
+
const ariaLabel = nls.localize(976, "{0} found for '{1}', at {2}", label, searchString, currentMatch.startLineNumber + ':' + currentMatch.startColumn);
|
|
333
333
|
const model = this._codeEditor.getModel();
|
|
334
334
|
if (model && (currentMatch.startLineNumber <= model.getLineCount()) && (currentMatch.startLineNumber >= 1)) {
|
|
335
335
|
const lineContent = model.getLineContent(currentMatch.startLineNumber);
|
|
@@ -337,7 +337,7 @@ export class FindWidget extends Widget {
|
|
|
337
337
|
}
|
|
338
338
|
return ariaLabel;
|
|
339
339
|
}
|
|
340
|
-
return nls.localize(
|
|
340
|
+
return nls.localize(977, "{0} found for '{1}'", label, searchString);
|
|
341
341
|
}
|
|
342
342
|
/**
|
|
343
343
|
* If 'selection find' is ON we should not disable the button (its function is to cancel 'selection find').
|