monaco-editor-core 0.54.0-dev-20250910 → 0.54.0-dev-20250911
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.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.ru.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 +8 -2
- package/esm/vs/base/browser/domSanitize.js +32 -21
- package/esm/vs/base/browser/domSanitize.js.map +1 -1
- package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/esm/vs/base/common/codiconsLibrary.js +2 -0
- package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
- package/esm/vs/editor/browser/config/editorConfiguration.js +1 -1
- package/esm/vs/editor/browser/controller/dragScrolling.js +4 -4
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +3 -3
- 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 +9 -9
- package/esm/vs/editor/browser/controller/mouseHandler.js +6 -6
- package/esm/vs/editor/browser/controller/mouseTarget.js +3 -3
- package/esm/vs/editor/browser/coreCommands.js +2 -2
- 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/view/viewController.js +2 -2
- 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 +3 -3
- package/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js +6 -6
- package/esm/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.js +8 -8
- package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +2 -2
- 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 +5 -5
- package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js +2 -2
- package/esm/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.js +4 -4
- 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 +4 -4
- 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/widget/codeEditor/codeEditorWidget.js +12 -12
- package/esm/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer.js +4 -4
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.js +3 -3
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js +2 -2
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/renderLines.js +2 -2
- package/esm/vs/editor/browser/widget/diffEditor/features/gutterFeature.js +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/features/overviewRulerFeature.js +1 -1
- package/esm/vs/editor/common/config/editorOptions.js +155 -154
- package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
- package/esm/vs/editor/common/core/editorColorRegistry.js +68 -68
- package/esm/vs/editor/common/cursorCommon.js +19 -19
- 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/standalone/standaloneEnums.js +86 -85
- package/esm/vs/editor/common/standalone/standaloneEnums.js.map +1 -1
- package/esm/vs/editor/common/standaloneStrings.js +10 -10
- package/esm/vs/editor/common/viewLayout/viewLayout.js +15 -15
- 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 +14 -14
- 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 +20 -20
- 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 +3 -3
- 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 +2 -2
- 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 +12 -12
- 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 +12 -12
- 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 +17 -17
- package/esm/vs/editor/contrib/find/browser/findModel.js +6 -6
- package/esm/vs/editor/contrib/find/browser/findWidget.js +32 -32
- 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/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/clickLinkGesture.js +21 -11
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture.js.map +1 -1
- 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/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 +10 -10
- 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 +8 -8
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsLocations.js +2 -2
- 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 +2 -2
- 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/model/inlineCompletionsModel.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +5 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +5 -5
- 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 +32 -32
- package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +4 -4
- package/esm/vs/editor/contrib/links/browser/links.js +11 -11
- 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 +1 -1
- package/esm/vs/editor/contrib/middleScroll/browser/middleScrollController.js +1 -1
- package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +36 -36
- 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/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/placeholderText/browser/placeholderTextContribution.js +1 -1
- package/esm/vs/editor/contrib/placeholderText/browser/placeholderTextContribution.js.map +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +5 -5
- 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/smartSelect/browser/smartSelect.js +5 -5
- package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
- 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 +17 -24
- 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 +12 -3
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollProvider.js.map +1 -1
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +5 -5
- package/esm/vs/editor/contrib/suggest/browser/suggest.js +8 -8
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js +14 -14
- 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 +23 -23
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +5 -5
- 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/wordHighlighter.js +7 -7
- package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +4 -4
- package/esm/vs/editor/editor.api.d.ts +93 -85
- package/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.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/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 +20 -12
- package/esm/vs/platform/quickinput/browser/quickInput.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputActions.js +42 -8
- package/esm/vs/platform/quickinput/browser/quickInputActions.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputController.js +6 -64
- package/esm/vs/platform/quickinput/browser/quickInputController.js.map +1 -1
- 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/monaco.d.ts +93 -85
- package/package.json +2 -2
- package/version.txt +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture.ts","vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAGhG,OAAO,EAAE,OAAO,EAAS,MAAM,qCAAqC,CAAC;AAErE,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,OAAO,KAAK,QAAQ,MAAM,wCAAwC,CAAC;AAKnE,SAAS,WAAW,CAAC,CAA6E,EAAE,QAAuD;IAC1J,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;AACtB,CAAC;AAED;;GAEG;AACH,MAAM,OAAO,mBAAmB;IAU/B,YAAY,MAAyB,EAAE,IAAsB;QAC5D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC;QAC3C,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC;QAC/C,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC;QAC7C,IAAI,CAAC,kBAAkB,GAAG,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;QAC1E,IAAI,CAAC,qBAAqB,GAAG,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,yBAAyB,CAAC,CAAC;QACvF,IAAI,CAAC,uBAAuB,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;IAC3D,CAAC;CACD;AAED;;GAEG;AACH,MAAM,OAAO,sBAAsB;IAMlC,YAAY,MAAsB,EAAE,IAAsB;QACzD,IAAI,CAAC,mBAAmB,GAAG,CAAC,MAAM,CAAC,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,CAAC,IAAI,EAAE,CAAC;QACvB,CAAC;IACF,CAAC;IAEO,aAAa;QACpB,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC;QAChC,IAAI,CAAC,yBAAyB,GAAG,KAAK,CAAC;QACvC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;IACvB,CAAC;CACD","file":"clickLinkGesture.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 { IKeyboardEvent } from '../../../../../base/browser/keyboardEvent.js';\nimport { Emitter, Event } from '../../../../../base/common/event.js';\nimport { KeyCode } from '../../../../../base/common/keyCodes.js';\nimport { Disposable } from '../../../../../base/common/lifecycle.js';\nimport * as platform from '../../../../../base/common/platform.js';\nimport { ICodeEditor, IEditorMouseEvent, IMouseTarget } from '../../../../browser/editorBrowser.js';\nimport { EditorOption } from '../../../../common/config/editorOptions.js';\nimport { ICursorSelectionChangedEvent } from '../../../../common/cursorEvents.js';\n\nfunction hasModifier(e: { ctrlKey: boolean; shiftKey: boolean; altKey: boolean; metaKey: boolean }, modifier: 'ctrlKey' | 'shiftKey' | 'altKey' | 'metaKey'): boolean {\n\treturn !!e[modifier];\n}\n\n/**\n * An event that encapsulates the various trigger modifiers logic needed for go to definition.\n */\nexport class ClickLinkMouseEvent {\n\n\tpublic readonly target: IMouseTarget;\n\tpublic readonly hasTriggerModifier: boolean;\n\tpublic readonly hasSideBySideModifier: boolean;\n\tpublic readonly isNoneOrSingleMouseDown: boolean;\n\tpublic readonly isLeftClick: boolean;\n\tpublic readonly isMiddleClick: boolean;\n\tpublic readonly isRightClick: boolean;\n\n\tconstructor(source: IEditorMouseEvent, opts: ClickLinkOptions) {\n\t\tthis.target = source.target;\n\t\tthis.isLeftClick = source.event.leftButton;\n\t\tthis.isMiddleClick = source.event.middleButton;\n\t\tthis.isRightClick = source.event.rightButton;\n\t\tthis.hasTriggerModifier = hasModifier(source.event, opts.triggerModifier);\n\t\tthis.hasSideBySideModifier = hasModifier(source.event, opts.triggerSideBySideModifier);\n\t\tthis.isNoneOrSingleMouseDown = (source.event.detail <= 1);\n\t}\n}\n\n/**\n * An event that encapsulates the various trigger modifiers logic needed for go to definition.\n */\nexport class ClickLinkKeyboardEvent {\n\n\tpublic readonly keyCodeIsTriggerKey: boolean;\n\tpublic readonly keyCodeIsSideBySideKey: boolean;\n\tpublic readonly hasTriggerModifier: boolean;\n\n\tconstructor(source: IKeyboardEvent, opts: ClickLinkOptions) {\n\t\tthis.keyCodeIsTriggerKey = (source.keyCode === opts.triggerKey);\n\t\tthis.keyCodeIsSideBySideKey = (source.keyCode === opts.triggerSideBySideKey);\n\t\tthis.hasTriggerModifier = hasModifier(source, opts.triggerModifier);\n\t}\n}\nexport type TriggerModifier = 'ctrlKey' | 'shiftKey' | 'altKey' | 'metaKey';\n\nexport class ClickLinkOptions {\n\n\tpublic readonly triggerKey: KeyCode;\n\tpublic readonly triggerModifier: TriggerModifier;\n\tpublic readonly triggerSideBySideKey: KeyCode;\n\tpublic readonly triggerSideBySideModifier: TriggerModifier;\n\n\tconstructor(\n\t\ttriggerKey: KeyCode,\n\t\ttriggerModifier: TriggerModifier,\n\t\ttriggerSideBySideKey: KeyCode,\n\t\ttriggerSideBySideModifier: TriggerModifier\n\t) {\n\t\tthis.triggerKey = triggerKey;\n\t\tthis.triggerModifier = triggerModifier;\n\t\tthis.triggerSideBySideKey = triggerSideBySideKey;\n\t\tthis.triggerSideBySideModifier = triggerSideBySideModifier;\n\t}\n\n\tpublic equals(other: ClickLinkOptions): boolean {\n\t\treturn (\n\t\t\tthis.triggerKey === other.triggerKey\n\t\t\t&& this.triggerModifier === other.triggerModifier\n\t\t\t&& this.triggerSideBySideKey === other.triggerSideBySideKey\n\t\t\t&& this.triggerSideBySideModifier === other.triggerSideBySideModifier\n\t\t);\n\t}\n}\n\nfunction createOptions(multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'): ClickLinkOptions {\n\tif (multiCursorModifier === 'altKey') {\n\t\tif (platform.isMacintosh) {\n\t\t\treturn new ClickLinkOptions(KeyCode.Meta, 'metaKey', KeyCode.Alt, 'altKey');\n\t\t}\n\t\treturn new ClickLinkOptions(KeyCode.Ctrl, 'ctrlKey', KeyCode.Alt, 'altKey');\n\t}\n\n\tif (platform.isMacintosh) {\n\t\treturn new ClickLinkOptions(KeyCode.Alt, 'altKey', KeyCode.Meta, 'metaKey');\n\t}\n\treturn new ClickLinkOptions(KeyCode.Alt, 'altKey', KeyCode.Ctrl, 'ctrlKey');\n}\n\nexport interface IClickLinkGestureOptions {\n\t/**\n\t * Return 0 if the mouse event should not be considered.\n\t */\n\textractLineNumberFromMouseEvent?: (e: ClickLinkMouseEvent) => number;\n}\n\nexport class ClickLinkGesture extends Disposable {\n\n\tprivate readonly _onMouseMoveOrRelevantKeyDown: Emitter<[ClickLinkMouseEvent, ClickLinkKeyboardEvent | null]> = this._register(new Emitter<[ClickLinkMouseEvent, ClickLinkKeyboardEvent | null]>());\n\tpublic readonly onMouseMoveOrRelevantKeyDown: Event<[ClickLinkMouseEvent, ClickLinkKeyboardEvent | null]> = this._onMouseMoveOrRelevantKeyDown.event;\n\n\tprivate readonly _onExecute: Emitter<ClickLinkMouseEvent> = this._register(new Emitter<ClickLinkMouseEvent>());\n\tpublic readonly onExecute: Event<ClickLinkMouseEvent> = this._onExecute.event;\n\n\tprivate readonly _onCancel: Emitter<void> = this._register(new Emitter<void>());\n\tpublic readonly onCancel: Event<void> = this._onCancel.event;\n\n\tprivate readonly _editor: ICodeEditor;\n\tprivate readonly _extractLineNumberFromMouseEvent: (e: ClickLinkMouseEvent) => number;\n\tprivate _opts: ClickLinkOptions;\n\n\tprivate _lastMouseMoveEvent: ClickLinkMouseEvent | null;\n\tprivate _hasTriggerKeyOnMouseDown: boolean;\n\tprivate _lineNumberOnMouseDown: number;\n\n\tconstructor(editor: ICodeEditor, opts?: IClickLinkGestureOptions) {\n\t\tsuper();\n\n\t\tthis._editor = editor;\n\t\tthis._extractLineNumberFromMouseEvent = opts?.extractLineNumberFromMouseEvent ?? ((e) => e.target.position ? e.target.position.lineNumber : 0);\n\t\tthis._opts = createOptions(this._editor.getOption(EditorOption.multiCursorModifier));\n\n\t\tthis._lastMouseMoveEvent = null;\n\t\tthis._hasTriggerKeyOnMouseDown = false;\n\t\tthis._lineNumberOnMouseDown = 0;\n\n\t\tthis._register(this._editor.onDidChangeConfiguration((e) => {\n\t\t\tif (e.hasChanged(EditorOption.multiCursorModifier)) {\n\t\t\t\tconst newOpts = createOptions(this._editor.getOption(EditorOption.multiCursorModifier));\n\t\t\t\tif (this._opts.equals(newOpts)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis._opts = newOpts;\n\t\t\t\tthis._lastMouseMoveEvent = null;\n\t\t\t\tthis._hasTriggerKeyOnMouseDown = false;\n\t\t\t\tthis._lineNumberOnMouseDown = 0;\n\t\t\t\tthis._onCancel.fire();\n\t\t\t}\n\t\t}));\n\t\tthis._register(this._editor.onMouseMove((e: IEditorMouseEvent) => this._onEditorMouseMove(new ClickLinkMouseEvent(e, this._opts))));\n\t\tthis._register(this._editor.onMouseDown((e: IEditorMouseEvent) => this._onEditorMouseDown(new ClickLinkMouseEvent(e, this._opts))));\n\t\tthis._register(this._editor.onMouseUp((e: IEditorMouseEvent) => this._onEditorMouseUp(new ClickLinkMouseEvent(e, this._opts))));\n\t\tthis._register(this._editor.onKeyDown((e: IKeyboardEvent) => this._onEditorKeyDown(new ClickLinkKeyboardEvent(e, this._opts))));\n\t\tthis._register(this._editor.onKeyUp((e: IKeyboardEvent) => this._onEditorKeyUp(new ClickLinkKeyboardEvent(e, this._opts))));\n\t\tthis._register(this._editor.onMouseDrag(() => this._resetHandler()));\n\n\t\tthis._register(this._editor.onDidChangeCursorSelection((e) => this._onDidChangeCursorSelection(e)));\n\t\tthis._register(this._editor.onDidChangeModel((e) => this._resetHandler()));\n\t\tthis._register(this._editor.onDidChangeModelContent(() => this._resetHandler()));\n\t\tthis._register(this._editor.onDidScrollChange((e) => {\n\t\t\tif (e.scrollTopChanged || e.scrollLeftChanged) {\n\t\t\t\tthis._resetHandler();\n\t\t\t}\n\t\t}));\n\t}\n\n\tprivate _onDidChangeCursorSelection(e: ICursorSelectionChangedEvent): void {\n\t\tif (e.selection && e.selection.startColumn !== e.selection.endColumn) {\n\t\t\tthis._resetHandler(); // immediately stop this feature if the user starts to select (https://github.com/microsoft/vscode/issues/7827)\n\t\t}\n\t}\n\n\tprivate _onEditorMouseMove(mouseEvent: ClickLinkMouseEvent): void {\n\t\tthis._lastMouseMoveEvent = mouseEvent;\n\n\t\tthis._onMouseMoveOrRelevantKeyDown.fire([mouseEvent, null]);\n\t}\n\n\tprivate _onEditorMouseDown(mouseEvent: ClickLinkMouseEvent): void {\n\t\t// We need to record if we had the trigger key on mouse down because someone might select something in the editor\n\t\t// holding the mouse down and then while mouse is down start to press Ctrl/Cmd to start a copy operation and then\n\t\t// release the mouse button without wanting to do the navigation.\n\t\t// With this flag we prevent goto definition if the mouse was down before the trigger key was pressed.\n\t\tthis._hasTriggerKeyOnMouseDown = mouseEvent.hasTriggerModifier;\n\t\tthis._lineNumberOnMouseDown = this._extractLineNumberFromMouseEvent(mouseEvent);\n\t}\n\n\tprivate _onEditorMouseUp(mouseEvent: ClickLinkMouseEvent): void {\n\t\tconst currentLineNumber = this._extractLineNumberFromMouseEvent(mouseEvent);\n\t\tif (this._hasTriggerKeyOnMouseDown && this._lineNumberOnMouseDown && this._lineNumberOnMouseDown === currentLineNumber) {\n\t\t\tthis._onExecute.fire(mouseEvent);\n\t\t}\n\t}\n\n\tprivate _onEditorKeyDown(e: ClickLinkKeyboardEvent): void {\n\t\tif (\n\t\t\tthis._lastMouseMoveEvent\n\t\t\t&& (\n\t\t\t\te.keyCodeIsTriggerKey // User just pressed Ctrl/Cmd (normal goto definition)\n\t\t\t\t|| (e.keyCodeIsSideBySideKey && e.hasTriggerModifier) // User pressed Ctrl/Cmd+Alt (goto definition to the side)\n\t\t\t)\n\t\t) {\n\t\t\tthis._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent, e]);\n\t\t} else if (e.hasTriggerModifier) {\n\t\t\tthis._onCancel.fire(); // remove decorations if user holds another key with ctrl/cmd to prevent accident goto declaration\n\t\t}\n\t}\n\n\tprivate _onEditorKeyUp(e: ClickLinkKeyboardEvent): void {\n\t\tif (e.keyCodeIsTriggerKey) {\n\t\t\tthis._onCancel.fire();\n\t\t}\n\t}\n\n\tprivate _resetHandler(): void {\n\t\tthis._lastMouseMoveEvent = null;\n\t\tthis._hasTriggerKeyOnMouseDown = false;\n\t\tthis._onCancel.fire();\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\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 { IKeyboardEvent } from '../../../../../base/browser/keyboardEvent.js';\nimport { Emitter, Event } from '../../../../../base/common/event.js';\nimport { KeyCode } from '../../../../../base/common/keyCodes.js';\nimport { Disposable } from '../../../../../base/common/lifecycle.js';\nimport * as platform from '../../../../../base/common/platform.js';\nimport { ICodeEditor, IEditorMouseEvent, IMouseTarget } from '../../../../browser/editorBrowser.js';\nimport { EditorOption } from '../../../../common/config/editorOptions.js';\nimport { ICursorSelectionChangedEvent } from '../../../../common/cursorEvents.js';\n\nfunction hasModifier(e: { ctrlKey: boolean; shiftKey: boolean; altKey: boolean; metaKey: boolean }, modifier: 'ctrlKey' | 'shiftKey' | 'altKey' | 'metaKey'): boolean {\n\treturn !!e[modifier];\n}\n\n/**\n * An event that encapsulates the various trigger modifiers logic needed for go to definition.\n */\nexport class ClickLinkMouseEvent {\n\n\tpublic readonly target: IMouseTarget;\n\tpublic readonly hasTriggerModifier: boolean;\n\tpublic readonly hasSideBySideModifier: boolean;\n\tpublic readonly isNoneOrSingleMouseDown: boolean;\n\tpublic readonly isLeftClick: boolean;\n\tpublic readonly isMiddleClick: boolean;\n\tpublic readonly isRightClick: boolean;\n\n\tconstructor(source: IEditorMouseEvent, opts: ClickLinkOptions) {\n\t\tthis.target = source.target;\n\t\tthis.isLeftClick = source.event.leftButton;\n\t\tthis.isMiddleClick = source.event.middleButton;\n\t\tthis.isRightClick = source.event.rightButton;\n\t\tthis.hasTriggerModifier = hasModifier(source.event, opts.triggerModifier);\n\t\tthis.hasSideBySideModifier = hasModifier(source.event, opts.triggerSideBySideModifier);\n\t\tthis.isNoneOrSingleMouseDown = (source.event.detail <= 1);\n\t}\n}\n\n/**\n * An event that encapsulates the various trigger modifiers logic needed for go to definition.\n */\nexport class ClickLinkKeyboardEvent {\n\n\tpublic readonly keyCodeIsTriggerKey: boolean;\n\tpublic readonly keyCodeIsSideBySideKey: boolean;\n\tpublic readonly hasTriggerModifier: boolean;\n\n\tconstructor(source: IKeyboardEvent, opts: ClickLinkOptions) {\n\t\tthis.keyCodeIsTriggerKey = (source.keyCode === opts.triggerKey);\n\t\tthis.keyCodeIsSideBySideKey = (source.keyCode === opts.triggerSideBySideKey);\n\t\tthis.hasTriggerModifier = hasModifier(source, opts.triggerModifier);\n\t}\n}\nexport type TriggerModifier = 'ctrlKey' | 'shiftKey' | 'altKey' | 'metaKey';\n\nexport class ClickLinkOptions {\n\n\tpublic readonly triggerKey: KeyCode;\n\tpublic readonly triggerModifier: TriggerModifier;\n\tpublic readonly triggerSideBySideKey: KeyCode;\n\tpublic readonly triggerSideBySideModifier: TriggerModifier;\n\n\tconstructor(\n\t\ttriggerKey: KeyCode,\n\t\ttriggerModifier: TriggerModifier,\n\t\ttriggerSideBySideKey: KeyCode,\n\t\ttriggerSideBySideModifier: TriggerModifier\n\t) {\n\t\tthis.triggerKey = triggerKey;\n\t\tthis.triggerModifier = triggerModifier;\n\t\tthis.triggerSideBySideKey = triggerSideBySideKey;\n\t\tthis.triggerSideBySideModifier = triggerSideBySideModifier;\n\t}\n\n\tpublic equals(other: ClickLinkOptions): boolean {\n\t\treturn (\n\t\t\tthis.triggerKey === other.triggerKey\n\t\t\t&& this.triggerModifier === other.triggerModifier\n\t\t\t&& this.triggerSideBySideKey === other.triggerSideBySideKey\n\t\t\t&& this.triggerSideBySideModifier === other.triggerSideBySideModifier\n\t\t);\n\t}\n}\n\nfunction createOptions(multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'): ClickLinkOptions {\n\tif (multiCursorModifier === 'altKey') {\n\t\tif (platform.isMacintosh) {\n\t\t\treturn new ClickLinkOptions(KeyCode.Meta, 'metaKey', KeyCode.Alt, 'altKey');\n\t\t}\n\t\treturn new ClickLinkOptions(KeyCode.Ctrl, 'ctrlKey', KeyCode.Alt, 'altKey');\n\t}\n\n\tif (platform.isMacintosh) {\n\t\treturn new ClickLinkOptions(KeyCode.Alt, 'altKey', KeyCode.Meta, 'metaKey');\n\t}\n\treturn new ClickLinkOptions(KeyCode.Alt, 'altKey', KeyCode.Ctrl, 'ctrlKey');\n}\n\nexport interface IClickLinkGestureOptions {\n\t/**\n\t * Return 0 if the mouse event should not be considered.\n\t */\n\textractLineNumberFromMouseEvent?: (e: ClickLinkMouseEvent) => number;\n}\n\nexport class ClickLinkGesture extends Disposable {\n\n\tprivate readonly _onMouseMoveOrRelevantKeyDown: Emitter<[ClickLinkMouseEvent, ClickLinkKeyboardEvent | null]> = this._register(new Emitter<[ClickLinkMouseEvent, ClickLinkKeyboardEvent | null]>());\n\tpublic readonly onMouseMoveOrRelevantKeyDown: Event<[ClickLinkMouseEvent, ClickLinkKeyboardEvent | null]> = this._onMouseMoveOrRelevantKeyDown.event;\n\n\tprivate readonly _onExecute: Emitter<ClickLinkMouseEvent> = this._register(new Emitter<ClickLinkMouseEvent>());\n\tpublic readonly onExecute: Event<ClickLinkMouseEvent> = this._onExecute.event;\n\n\tprivate readonly _onCancel: Emitter<void> = this._register(new Emitter<void>());\n\tpublic readonly onCancel: Event<void> = this._onCancel.event;\n\n\tprivate readonly _editor: ICodeEditor;\n\tprivate readonly _extractLineNumberFromMouseEvent: (e: ClickLinkMouseEvent) => number;\n\tprivate _opts: ClickLinkOptions;\n\n\tprivate _lastMouseMoveEvent: ClickLinkMouseEvent | null;\n\tprivate _hasTriggerKeyOnMouseDown: boolean;\n\tprivate _lineNumberOnMouseDown: number;\n\n\tconstructor(editor: ICodeEditor, opts?: IClickLinkGestureOptions) {\n\t\tsuper();\n\n\t\tthis._editor = editor;\n\t\tthis._extractLineNumberFromMouseEvent = opts?.extractLineNumberFromMouseEvent ?? ((e) => e.target.position ? e.target.position.lineNumber : 0);\n\t\tthis._opts = createOptions(this._editor.getOption(EditorOption.multiCursorModifier));\n\n\t\tthis._lastMouseMoveEvent = null;\n\t\tthis._hasTriggerKeyOnMouseDown = false;\n\t\tthis._lineNumberOnMouseDown = 0;\n\n\t\tthis._register(this._editor.onDidChangeConfiguration((e) => {\n\t\t\tif (e.hasChanged(EditorOption.multiCursorModifier)) {\n\t\t\t\tconst newOpts = createOptions(this._editor.getOption(EditorOption.multiCursorModifier));\n\t\t\t\tif (this._opts.equals(newOpts)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis._opts = newOpts;\n\t\t\t\tthis._lastMouseMoveEvent = null;\n\t\t\t\tthis._hasTriggerKeyOnMouseDown = false;\n\t\t\t\tthis._lineNumberOnMouseDown = 0;\n\t\t\t\tthis._onCancel.fire();\n\t\t\t}\n\t\t}));\n\t\tthis._register(this._editor.onMouseMove((e: IEditorMouseEvent) => this._onEditorMouseMove(new ClickLinkMouseEvent(e, this._opts))));\n\t\tthis._register(this._editor.onMouseDown((e: IEditorMouseEvent) => this._onEditorMouseDown(new ClickLinkMouseEvent(e, this._opts))));\n\t\tthis._register(this._editor.onMouseUp((e: IEditorMouseEvent) => this._onEditorMouseUp(new ClickLinkMouseEvent(e, this._opts))));\n\t\tthis._register(this._editor.onKeyDown((e: IKeyboardEvent) => this._onEditorKeyDown(new ClickLinkKeyboardEvent(e, this._opts))));\n\t\tthis._register(this._editor.onKeyUp((e: IKeyboardEvent) => this._onEditorKeyUp(new ClickLinkKeyboardEvent(e, this._opts))));\n\t\tthis._register(this._editor.onMouseDrag(() => this._resetHandler()));\n\n\t\tthis._register(this._editor.onDidChangeCursorSelection((e) => this._onDidChangeCursorSelection(e)));\n\t\tthis._register(this._editor.onDidChangeModel((e) => this._resetHandler()));\n\t\tthis._register(this._editor.onDidChangeModelContent(() => this._resetHandler()));\n\t\tthis._register(this._editor.onDidScrollChange((e) => {\n\t\t\tif (e.scrollTopChanged || e.scrollLeftChanged) {\n\t\t\t\tthis._resetHandler();\n\t\t\t}\n\t\t}));\n\t}\n\n\tprivate _onDidChangeCursorSelection(e: ICursorSelectionChangedEvent): void {\n\t\tif (e.selection && e.selection.startColumn !== e.selection.endColumn) {\n\t\t\tthis._resetHandler(); // immediately stop this feature if the user starts to select (https://github.com/microsoft/vscode/issues/7827)\n\t\t}\n\t}\n\n\tprivate _onEditorMouseMove(mouseEvent: ClickLinkMouseEvent): void {\n\t\tthis._lastMouseMoveEvent = mouseEvent;\n\n\t\tthis._onMouseMoveOrRelevantKeyDown.fire([mouseEvent, null]);\n\t}\n\n\tprivate _onEditorMouseDown(mouseEvent: ClickLinkMouseEvent): void {\n\t\t// We need to record if we had the trigger key on mouse down because someone might select something in the editor\n\t\t// holding the mouse down and then while mouse is down start to press Ctrl/Cmd to start a copy operation and then\n\t\t// release the mouse button without wanting to do the navigation.\n\t\t// With this flag we prevent goto definition if the mouse was down before the trigger key was pressed.\n\t\tthis._hasTriggerKeyOnMouseDown = mouseEvent.hasTriggerModifier;\n\t\tthis._lineNumberOnMouseDown = this._extractLineNumberFromMouseEvent(mouseEvent);\n\t}\n\n\tprivate _onEditorMouseUp(mouseEvent: ClickLinkMouseEvent): void {\n\t\tconst currentLineNumber = this._extractLineNumberFromMouseEvent(mouseEvent);\n\t\tif (this._hasTriggerKeyOnMouseDown && this._lineNumberOnMouseDown && this._lineNumberOnMouseDown === currentLineNumber) {\n\t\t\tthis._onExecute.fire(mouseEvent);\n\t\t}\n\t}\n\n\tprivate _onEditorKeyDown(e: ClickLinkKeyboardEvent): void {\n\t\tif (\n\t\t\tthis._lastMouseMoveEvent\n\t\t\t&& (\n\t\t\t\te.keyCodeIsTriggerKey // User just pressed Ctrl/Cmd (normal goto definition)\n\t\t\t\t|| (e.keyCodeIsSideBySideKey && e.hasTriggerModifier) // User pressed Ctrl/Cmd+Alt (goto definition to the side)\n\t\t\t)\n\t\t) {\n\t\t\tthis._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent, e]);\n\t\t} else if (e.hasTriggerModifier) {\n\t\t\tthis._onCancel.fire(); // remove decorations if user holds another key with ctrl/cmd to prevent accident goto declaration\n\t\t}\n\t}\n\n\tprivate _onEditorKeyUp(e: ClickLinkKeyboardEvent): void {\n\t\tif (e.keyCodeIsTriggerKey) {\n\t\t\tthis._onCancel.fire();\n\t\t}\n\t}\n\n\tprivate _resetHandler(): void {\n\t\tthis._lastMouseMoveEvent = null;\n\t\tthis._hasTriggerKeyOnMouseDown = false;\n\t\tthis._onCancel.fire();\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture.ts","vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAGhG,OAAO,EAAE,OAAO,EAAS,MAAM,qCAAqC,CAAC;AAErE,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,OAAO,KAAK,QAAQ,MAAM,wCAAwC,CAAC;AAKnE,SAAS,WAAW,CAAC,CAA6E,EAAE,QAAuD;IAC1J,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;AACtB,CAAC;AAED;;GAEG;AACH,MAAM,O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,CAAC;QACxE,CAAC;aAAM,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;YACjC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC,kGAAkG;QAC1H,CAAC;IACF,CAAC;IAEO,cAAc,CAAC,CAAyB;QAC/C,IAAI,CAAC,CAAC,mBAAmB,EAAE,CAAC;YAC3B,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QACvB,CAAC;IACF,CAAC;IAEO,aAAa;QACpB,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC;QAChC,IAAI,CAAC,yBAAyB,GAAG,KAAK,CAAC;QACvC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;IACvB,CAAC;CACD","file":"clickLinkGesture.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 { IKeyboardEvent } from '../../../../../base/browser/keyboardEvent.js';\nimport { Emitter, Event } from '../../../../../base/common/event.js';\nimport { KeyCode } from '../../../../../base/common/keyCodes.js';\nimport { Disposable } from '../../../../../base/common/lifecycle.js';\nimport * as platform from '../../../../../base/common/platform.js';\nimport { ICodeEditor, IEditorMouseEvent, IMouseTarget } from '../../../../browser/editorBrowser.js';\nimport { EditorOption, MouseMiddleClickAction } from '../../../../common/config/editorOptions.js';\nimport { ICursorSelectionChangedEvent } from '../../../../common/cursorEvents.js';\n\nfunction hasModifier(e: { ctrlKey: boolean; shiftKey: boolean; altKey: boolean; metaKey: boolean }, modifier: 'ctrlKey' | 'shiftKey' | 'altKey' | 'metaKey'): boolean {\n\treturn !!e[modifier];\n}\n\n/**\n * An event that encapsulates the various trigger modifiers logic needed for go to definition.\n */\nexport class ClickLinkMouseEvent {\n\n\tpublic readonly target: IMouseTarget;\n\tpublic readonly hasTriggerModifier: boolean;\n\tpublic readonly hasSideBySideModifier: boolean;\n\tpublic readonly isNoneOrSingleMouseDown: boolean;\n\tpublic readonly isLeftClick: boolean;\n\tpublic readonly isMiddleClick: boolean;\n\tpublic readonly isRightClick: boolean;\n\n\tpublic readonly mouseMiddleClickAction: MouseMiddleClickAction;\n\n\tconstructor(source: IEditorMouseEvent, opts: ClickLinkOptions) {\n\t\tthis.target = source.target;\n\t\tthis.isLeftClick = source.event.leftButton;\n\t\tthis.isMiddleClick = source.event.middleButton;\n\t\tthis.isRightClick = source.event.rightButton;\n\t\tthis.mouseMiddleClickAction = opts.mouseMiddleClickAction;\n\t\tthis.hasTriggerModifier = hasModifier(source.event, opts.triggerModifier);\n\n\t\tif (this.isMiddleClick && opts.mouseMiddleClickAction === 'ctrlLeftClick') {\n\t\t\t// Redirect middle click to left click with modifier\n\t\t\tthis.isMiddleClick = false;\n\t\t\tthis.isLeftClick = true;\n\t\t\tthis.hasTriggerModifier = true;\n\t\t}\n\t\tthis.hasSideBySideModifier = hasModifier(source.event, opts.triggerSideBySideModifier);\n\t\tthis.isNoneOrSingleMouseDown = (source.event.detail <= 1);\n\t}\n}\n\n/**\n * An event that encapsulates the various trigger modifiers logic needed for go to definition.\n */\nexport class ClickLinkKeyboardEvent {\n\n\tpublic readonly keyCodeIsTriggerKey: boolean;\n\tpublic readonly keyCodeIsSideBySideKey: boolean;\n\tpublic readonly hasTriggerModifier: boolean;\n\n\tconstructor(source: IKeyboardEvent, opts: ClickLinkOptions) {\n\t\tthis.keyCodeIsTriggerKey = (source.keyCode === opts.triggerKey);\n\t\tthis.keyCodeIsSideBySideKey = (source.keyCode === opts.triggerSideBySideKey);\n\t\tthis.hasTriggerModifier = hasModifier(source, opts.triggerModifier);\n\t}\n}\nexport type TriggerModifier = 'ctrlKey' | 'shiftKey' | 'altKey' | 'metaKey';\n\nexport class ClickLinkOptions {\n\n\tpublic readonly triggerKey: KeyCode;\n\tpublic readonly triggerModifier: TriggerModifier;\n\tpublic readonly triggerSideBySideKey: KeyCode;\n\tpublic readonly triggerSideBySideModifier: TriggerModifier;\n\n\tconstructor(\n\t\ttriggerKey: KeyCode,\n\t\ttriggerModifier: TriggerModifier,\n\t\ttriggerSideBySideKey: KeyCode,\n\t\ttriggerSideBySideModifier: TriggerModifier,\n\t\tpublic readonly mouseMiddleClickAction: MouseMiddleClickAction,\n\t) {\n\t\tthis.triggerKey = triggerKey;\n\t\tthis.triggerModifier = triggerModifier;\n\t\tthis.triggerSideBySideKey = triggerSideBySideKey;\n\t\tthis.triggerSideBySideModifier = triggerSideBySideModifier;\n\t}\n\n\tpublic equals(other: ClickLinkOptions): boolean {\n\t\treturn (\n\t\t\tthis.triggerKey === other.triggerKey\n\t\t\t&& this.triggerModifier === other.triggerModifier\n\t\t\t&& this.triggerSideBySideKey === other.triggerSideBySideKey\n\t\t\t&& this.triggerSideBySideModifier === other.triggerSideBySideModifier\n\t\t\t&& this.mouseMiddleClickAction === other.mouseMiddleClickAction\n\t\t);\n\t}\n}\n\nfunction createOptions(multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey', mouseMiddleClickAction: MouseMiddleClickAction): ClickLinkOptions {\n\tif (multiCursorModifier === 'altKey') {\n\t\tif (platform.isMacintosh) {\n\t\t\treturn new ClickLinkOptions(KeyCode.Meta, 'metaKey', KeyCode.Alt, 'altKey', mouseMiddleClickAction);\n\t\t}\n\t\treturn new ClickLinkOptions(KeyCode.Ctrl, 'ctrlKey', KeyCode.Alt, 'altKey', mouseMiddleClickAction);\n\t}\n\n\tif (platform.isMacintosh) {\n\t\treturn new ClickLinkOptions(KeyCode.Alt, 'altKey', KeyCode.Meta, 'metaKey', mouseMiddleClickAction);\n\t}\n\treturn new ClickLinkOptions(KeyCode.Alt, 'altKey', KeyCode.Ctrl, 'ctrlKey', mouseMiddleClickAction);\n}\n\nexport interface IClickLinkGestureOptions {\n\t/**\n\t * Return 0 if the mouse event should not be considered.\n\t */\n\textractLineNumberFromMouseEvent?: (e: ClickLinkMouseEvent) => number;\n}\n\nexport class ClickLinkGesture extends Disposable {\n\n\tprivate readonly _onMouseMoveOrRelevantKeyDown: Emitter<[ClickLinkMouseEvent, ClickLinkKeyboardEvent | null]> = this._register(new Emitter<[ClickLinkMouseEvent, ClickLinkKeyboardEvent | null]>());\n\tpublic readonly onMouseMoveOrRelevantKeyDown: Event<[ClickLinkMouseEvent, ClickLinkKeyboardEvent | null]> = this._onMouseMoveOrRelevantKeyDown.event;\n\n\tprivate readonly _onExecute: Emitter<ClickLinkMouseEvent> = this._register(new Emitter<ClickLinkMouseEvent>());\n\tpublic readonly onExecute: Event<ClickLinkMouseEvent> = this._onExecute.event;\n\n\tprivate readonly _onCancel: Emitter<void> = this._register(new Emitter<void>());\n\tpublic readonly onCancel: Event<void> = this._onCancel.event;\n\n\tprivate readonly _editor: ICodeEditor;\n\tprivate readonly _extractLineNumberFromMouseEvent: (e: ClickLinkMouseEvent) => number;\n\tprivate _opts: ClickLinkOptions;\n\n\tprivate _lastMouseMoveEvent: ClickLinkMouseEvent | null;\n\tprivate _hasTriggerKeyOnMouseDown: boolean;\n\tprivate _lineNumberOnMouseDown: number;\n\n\tconstructor(editor: ICodeEditor, opts?: IClickLinkGestureOptions) {\n\t\tsuper();\n\n\t\tthis._editor = editor;\n\t\tthis._extractLineNumberFromMouseEvent = opts?.extractLineNumberFromMouseEvent ?? ((e) => e.target.position ? e.target.position.lineNumber : 0);\n\t\tthis._opts = createOptions(this._editor.getOption(EditorOption.multiCursorModifier), this._editor.getOption(EditorOption.mouseMiddleClickAction));\n\n\t\tthis._lastMouseMoveEvent = null;\n\t\tthis._hasTriggerKeyOnMouseDown = false;\n\t\tthis._lineNumberOnMouseDown = 0;\n\n\t\tthis._register(this._editor.onDidChangeConfiguration((e) => {\n\t\t\tif (e.hasChanged(EditorOption.multiCursorModifier) || e.hasChanged(EditorOption.mouseMiddleClickAction)) {\n\t\t\t\tconst newOpts = createOptions(this._editor.getOption(EditorOption.multiCursorModifier), this._editor.getOption(EditorOption.mouseMiddleClickAction));\n\t\t\t\tif (this._opts.equals(newOpts)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis._opts = newOpts;\n\t\t\t\tthis._lastMouseMoveEvent = null;\n\t\t\t\tthis._hasTriggerKeyOnMouseDown = false;\n\t\t\t\tthis._lineNumberOnMouseDown = 0;\n\t\t\t\tthis._onCancel.fire();\n\t\t\t}\n\t\t}));\n\t\tthis._register(this._editor.onMouseMove((e: IEditorMouseEvent) => this._onEditorMouseMove(new ClickLinkMouseEvent(e, this._opts))));\n\t\tthis._register(this._editor.onMouseDown((e: IEditorMouseEvent) => this._onEditorMouseDown(new ClickLinkMouseEvent(e, this._opts))));\n\t\tthis._register(this._editor.onMouseUp((e: IEditorMouseEvent) => this._onEditorMouseUp(new ClickLinkMouseEvent(e, this._opts))));\n\t\tthis._register(this._editor.onKeyDown((e: IKeyboardEvent) => this._onEditorKeyDown(new ClickLinkKeyboardEvent(e, this._opts))));\n\t\tthis._register(this._editor.onKeyUp((e: IKeyboardEvent) => this._onEditorKeyUp(new ClickLinkKeyboardEvent(e, this._opts))));\n\t\tthis._register(this._editor.onMouseDrag(() => this._resetHandler()));\n\n\t\tthis._register(this._editor.onDidChangeCursorSelection((e) => this._onDidChangeCursorSelection(e)));\n\t\tthis._register(this._editor.onDidChangeModel((e) => this._resetHandler()));\n\t\tthis._register(this._editor.onDidChangeModelContent(() => this._resetHandler()));\n\t\tthis._register(this._editor.onDidScrollChange((e) => {\n\t\t\tif (e.scrollTopChanged || e.scrollLeftChanged) {\n\t\t\t\tthis._resetHandler();\n\t\t\t}\n\t\t}));\n\t}\n\n\tprivate _onDidChangeCursorSelection(e: ICursorSelectionChangedEvent): void {\n\t\tif (e.selection && e.selection.startColumn !== e.selection.endColumn) {\n\t\t\tthis._resetHandler(); // immediately stop this feature if the user starts to select (https://github.com/microsoft/vscode/issues/7827)\n\t\t}\n\t}\n\n\tprivate _onEditorMouseMove(mouseEvent: ClickLinkMouseEvent): void {\n\t\tthis._lastMouseMoveEvent = mouseEvent;\n\n\t\tthis._onMouseMoveOrRelevantKeyDown.fire([mouseEvent, null]);\n\t}\n\n\tprivate _onEditorMouseDown(mouseEvent: ClickLinkMouseEvent): void {\n\t\t// We need to record if we had the trigger key on mouse down because someone might select something in the editor\n\t\t// holding the mouse down and then while mouse is down start to press Ctrl/Cmd to start a copy operation and then\n\t\t// release the mouse button without wanting to do the navigation.\n\t\t// With this flag we prevent goto definition if the mouse was down before the trigger key was pressed.\n\t\tthis._hasTriggerKeyOnMouseDown = mouseEvent.hasTriggerModifier;\n\t\tthis._lineNumberOnMouseDown = this._extractLineNumberFromMouseEvent(mouseEvent);\n\t}\n\n\tprivate _onEditorMouseUp(mouseEvent: ClickLinkMouseEvent): void {\n\t\tconst currentLineNumber = this._extractLineNumberFromMouseEvent(mouseEvent);\n\t\tconst lineNumbersCorrect = !!this._lineNumberOnMouseDown && this._lineNumberOnMouseDown === currentLineNumber;\n\t\tif (lineNumbersCorrect && (this._hasTriggerKeyOnMouseDown || (mouseEvent.isMiddleClick && mouseEvent.mouseMiddleClickAction === 'openLink'))) {\n\t\t\tthis._onExecute.fire(mouseEvent);\n\t\t}\n\t}\n\n\tprivate _onEditorKeyDown(e: ClickLinkKeyboardEvent): void {\n\t\tif (\n\t\t\tthis._lastMouseMoveEvent\n\t\t\t&& (\n\t\t\t\te.keyCodeIsTriggerKey // User just pressed Ctrl/Cmd (normal goto definition)\n\t\t\t\t|| (e.keyCodeIsSideBySideKey && e.hasTriggerModifier) // User pressed Ctrl/Cmd+Alt (goto definition to the side)\n\t\t\t)\n\t\t) {\n\t\t\tthis._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent, e]);\n\t\t} else if (e.hasTriggerModifier) {\n\t\t\tthis._onCancel.fire(); // remove decorations if user holds another key with ctrl/cmd to prevent accident goto declaration\n\t\t}\n\t}\n\n\tprivate _onEditorKeyUp(e: ClickLinkKeyboardEvent): void {\n\t\tif (e.keyCodeIsTriggerKey) {\n\t\t\tthis._onCancel.fire();\n\t\t}\n\t}\n\n\tprivate _resetHandler(): void {\n\t\tthis._lastMouseMoveEvent = null;\n\t\tthis._hasTriggerKeyOnMouseDown = false;\n\t\tthis._onCancel.fire();\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\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 { IKeyboardEvent } from '../../../../../base/browser/keyboardEvent.js';\nimport { Emitter, Event } from '../../../../../base/common/event.js';\nimport { KeyCode } from '../../../../../base/common/keyCodes.js';\nimport { Disposable } from '../../../../../base/common/lifecycle.js';\nimport * as platform from '../../../../../base/common/platform.js';\nimport { ICodeEditor, IEditorMouseEvent, IMouseTarget } from '../../../../browser/editorBrowser.js';\nimport { EditorOption, MouseMiddleClickAction } from '../../../../common/config/editorOptions.js';\nimport { ICursorSelectionChangedEvent } from '../../../../common/cursorEvents.js';\n\nfunction hasModifier(e: { ctrlKey: boolean; shiftKey: boolean; altKey: boolean; metaKey: boolean }, modifier: 'ctrlKey' | 'shiftKey' | 'altKey' | 'metaKey'): boolean {\n\treturn !!e[modifier];\n}\n\n/**\n * An event that encapsulates the various trigger modifiers logic needed for go to definition.\n */\nexport class ClickLinkMouseEvent {\n\n\tpublic readonly target: IMouseTarget;\n\tpublic readonly hasTriggerModifier: boolean;\n\tpublic readonly hasSideBySideModifier: boolean;\n\tpublic readonly isNoneOrSingleMouseDown: boolean;\n\tpublic readonly isLeftClick: boolean;\n\tpublic readonly isMiddleClick: boolean;\n\tpublic readonly isRightClick: boolean;\n\n\tpublic readonly mouseMiddleClickAction: MouseMiddleClickAction;\n\n\tconstructor(source: IEditorMouseEvent, opts: ClickLinkOptions) {\n\t\tthis.target = source.target;\n\t\tthis.isLeftClick = source.event.leftButton;\n\t\tthis.isMiddleClick = source.event.middleButton;\n\t\tthis.isRightClick = source.event.rightButton;\n\t\tthis.mouseMiddleClickAction = opts.mouseMiddleClickAction;\n\t\tthis.hasTriggerModifier = hasModifier(source.event, opts.triggerModifier);\n\n\t\tif (this.isMiddleClick && opts.mouseMiddleClickAction === 'ctrlLeftClick') {\n\t\t\t// Redirect middle click to left click with modifier\n\t\t\tthis.isMiddleClick = false;\n\t\t\tthis.isLeftClick = true;\n\t\t\tthis.hasTriggerModifier = true;\n\t\t}\n\t\tthis.hasSideBySideModifier = hasModifier(source.event, opts.triggerSideBySideModifier);\n\t\tthis.isNoneOrSingleMouseDown = (source.event.detail <= 1);\n\t}\n}\n\n/**\n * An event that encapsulates the various trigger modifiers logic needed for go to definition.\n */\nexport class ClickLinkKeyboardEvent {\n\n\tpublic readonly keyCodeIsTriggerKey: boolean;\n\tpublic readonly keyCodeIsSideBySideKey: boolean;\n\tpublic readonly hasTriggerModifier: boolean;\n\n\tconstructor(source: IKeyboardEvent, opts: ClickLinkOptions) {\n\t\tthis.keyCodeIsTriggerKey = (source.keyCode === opts.triggerKey);\n\t\tthis.keyCodeIsSideBySideKey = (source.keyCode === opts.triggerSideBySideKey);\n\t\tthis.hasTriggerModifier = hasModifier(source, opts.triggerModifier);\n\t}\n}\nexport type TriggerModifier = 'ctrlKey' | 'shiftKey' | 'altKey' | 'metaKey';\n\nexport class ClickLinkOptions {\n\n\tpublic readonly triggerKey: KeyCode;\n\tpublic readonly triggerModifier: TriggerModifier;\n\tpublic readonly triggerSideBySideKey: KeyCode;\n\tpublic readonly triggerSideBySideModifier: TriggerModifier;\n\n\tconstructor(\n\t\ttriggerKey: KeyCode,\n\t\ttriggerModifier: TriggerModifier,\n\t\ttriggerSideBySideKey: KeyCode,\n\t\ttriggerSideBySideModifier: TriggerModifier,\n\t\tpublic readonly mouseMiddleClickAction: MouseMiddleClickAction,\n\t) {\n\t\tthis.triggerKey = triggerKey;\n\t\tthis.triggerModifier = triggerModifier;\n\t\tthis.triggerSideBySideKey = triggerSideBySideKey;\n\t\tthis.triggerSideBySideModifier = triggerSideBySideModifier;\n\t}\n\n\tpublic equals(other: ClickLinkOptions): boolean {\n\t\treturn (\n\t\t\tthis.triggerKey === other.triggerKey\n\t\t\t&& this.triggerModifier === other.triggerModifier\n\t\t\t&& this.triggerSideBySideKey === other.triggerSideBySideKey\n\t\t\t&& this.triggerSideBySideModifier === other.triggerSideBySideModifier\n\t\t\t&& this.mouseMiddleClickAction === other.mouseMiddleClickAction\n\t\t);\n\t}\n}\n\nfunction createOptions(multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey', mouseMiddleClickAction: MouseMiddleClickAction): ClickLinkOptions {\n\tif (multiCursorModifier === 'altKey') {\n\t\tif (platform.isMacintosh) {\n\t\t\treturn new ClickLinkOptions(KeyCode.Meta, 'metaKey', KeyCode.Alt, 'altKey', mouseMiddleClickAction);\n\t\t}\n\t\treturn new ClickLinkOptions(KeyCode.Ctrl, 'ctrlKey', KeyCode.Alt, 'altKey', mouseMiddleClickAction);\n\t}\n\n\tif (platform.isMacintosh) {\n\t\treturn new ClickLinkOptions(KeyCode.Alt, 'altKey', KeyCode.Meta, 'metaKey', mouseMiddleClickAction);\n\t}\n\treturn new ClickLinkOptions(KeyCode.Alt, 'altKey', KeyCode.Ctrl, 'ctrlKey', mouseMiddleClickAction);\n}\n\nexport interface IClickLinkGestureOptions {\n\t/**\n\t * Return 0 if the mouse event should not be considered.\n\t */\n\textractLineNumberFromMouseEvent?: (e: ClickLinkMouseEvent) => number;\n}\n\nexport class ClickLinkGesture extends Disposable {\n\n\tprivate readonly _onMouseMoveOrRelevantKeyDown: Emitter<[ClickLinkMouseEvent, ClickLinkKeyboardEvent | null]> = this._register(new Emitter<[ClickLinkMouseEvent, ClickLinkKeyboardEvent | null]>());\n\tpublic readonly onMouseMoveOrRelevantKeyDown: Event<[ClickLinkMouseEvent, ClickLinkKeyboardEvent | null]> = this._onMouseMoveOrRelevantKeyDown.event;\n\n\tprivate readonly _onExecute: Emitter<ClickLinkMouseEvent> = this._register(new Emitter<ClickLinkMouseEvent>());\n\tpublic readonly onExecute: Event<ClickLinkMouseEvent> = this._onExecute.event;\n\n\tprivate readonly _onCancel: Emitter<void> = this._register(new Emitter<void>());\n\tpublic readonly onCancel: Event<void> = this._onCancel.event;\n\n\tprivate readonly _editor: ICodeEditor;\n\tprivate readonly _extractLineNumberFromMouseEvent: (e: ClickLinkMouseEvent) => number;\n\tprivate _opts: ClickLinkOptions;\n\n\tprivate _lastMouseMoveEvent: ClickLinkMouseEvent | null;\n\tprivate _hasTriggerKeyOnMouseDown: boolean;\n\tprivate _lineNumberOnMouseDown: number;\n\n\tconstructor(editor: ICodeEditor, opts?: IClickLinkGestureOptions) {\n\t\tsuper();\n\n\t\tthis._editor = editor;\n\t\tthis._extractLineNumberFromMouseEvent = opts?.extractLineNumberFromMouseEvent ?? ((e) => e.target.position ? e.target.position.lineNumber : 0);\n\t\tthis._opts = createOptions(this._editor.getOption(EditorOption.multiCursorModifier), this._editor.getOption(EditorOption.mouseMiddleClickAction));\n\n\t\tthis._lastMouseMoveEvent = null;\n\t\tthis._hasTriggerKeyOnMouseDown = false;\n\t\tthis._lineNumberOnMouseDown = 0;\n\n\t\tthis._register(this._editor.onDidChangeConfiguration((e) => {\n\t\t\tif (e.hasChanged(EditorOption.multiCursorModifier) || e.hasChanged(EditorOption.mouseMiddleClickAction)) {\n\t\t\t\tconst newOpts = createOptions(this._editor.getOption(EditorOption.multiCursorModifier), this._editor.getOption(EditorOption.mouseMiddleClickAction));\n\t\t\t\tif (this._opts.equals(newOpts)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis._opts = newOpts;\n\t\t\t\tthis._lastMouseMoveEvent = null;\n\t\t\t\tthis._hasTriggerKeyOnMouseDown = false;\n\t\t\t\tthis._lineNumberOnMouseDown = 0;\n\t\t\t\tthis._onCancel.fire();\n\t\t\t}\n\t\t}));\n\t\tthis._register(this._editor.onMouseMove((e: IEditorMouseEvent) => this._onEditorMouseMove(new ClickLinkMouseEvent(e, this._opts))));\n\t\tthis._register(this._editor.onMouseDown((e: IEditorMouseEvent) => this._onEditorMouseDown(new ClickLinkMouseEvent(e, this._opts))));\n\t\tthis._register(this._editor.onMouseUp((e: IEditorMouseEvent) => this._onEditorMouseUp(new ClickLinkMouseEvent(e, this._opts))));\n\t\tthis._register(this._editor.onKeyDown((e: IKeyboardEvent) => this._onEditorKeyDown(new ClickLinkKeyboardEvent(e, this._opts))));\n\t\tthis._register(this._editor.onKeyUp((e: IKeyboardEvent) => this._onEditorKeyUp(new ClickLinkKeyboardEvent(e, this._opts))));\n\t\tthis._register(this._editor.onMouseDrag(() => this._resetHandler()));\n\n\t\tthis._register(this._editor.onDidChangeCursorSelection((e) => this._onDidChangeCursorSelection(e)));\n\t\tthis._register(this._editor.onDidChangeModel((e) => this._resetHandler()));\n\t\tthis._register(this._editor.onDidChangeModelContent(() => this._resetHandler()));\n\t\tthis._register(this._editor.onDidScrollChange((e) => {\n\t\t\tif (e.scrollTopChanged || e.scrollLeftChanged) {\n\t\t\t\tthis._resetHandler();\n\t\t\t}\n\t\t}));\n\t}\n\n\tprivate _onDidChangeCursorSelection(e: ICursorSelectionChangedEvent): void {\n\t\tif (e.selection && e.selection.startColumn !== e.selection.endColumn) {\n\t\t\tthis._resetHandler(); // immediately stop this feature if the user starts to select (https://github.com/microsoft/vscode/issues/7827)\n\t\t}\n\t}\n\n\tprivate _onEditorMouseMove(mouseEvent: ClickLinkMouseEvent): void {\n\t\tthis._lastMouseMoveEvent = mouseEvent;\n\n\t\tthis._onMouseMoveOrRelevantKeyDown.fire([mouseEvent, null]);\n\t}\n\n\tprivate _onEditorMouseDown(mouseEvent: ClickLinkMouseEvent): void {\n\t\t// We need to record if we had the trigger key on mouse down because someone might select something in the editor\n\t\t// holding the mouse down and then while mouse is down start to press Ctrl/Cmd to start a copy operation and then\n\t\t// release the mouse button without wanting to do the navigation.\n\t\t// With this flag we prevent goto definition if the mouse was down before the trigger key was pressed.\n\t\tthis._hasTriggerKeyOnMouseDown = mouseEvent.hasTriggerModifier;\n\t\tthis._lineNumberOnMouseDown = this._extractLineNumberFromMouseEvent(mouseEvent);\n\t}\n\n\tprivate _onEditorMouseUp(mouseEvent: ClickLinkMouseEvent): void {\n\t\tconst currentLineNumber = this._extractLineNumberFromMouseEvent(mouseEvent);\n\t\tconst lineNumbersCorrect = !!this._lineNumberOnMouseDown && this._lineNumberOnMouseDown === currentLineNumber;\n\t\tif (lineNumbersCorrect && (this._hasTriggerKeyOnMouseDown || (mouseEvent.isMiddleClick && mouseEvent.mouseMiddleClickAction === 'openLink'))) {\n\t\t\tthis._onExecute.fire(mouseEvent);\n\t\t}\n\t}\n\n\tprivate _onEditorKeyDown(e: ClickLinkKeyboardEvent): void {\n\t\tif (\n\t\t\tthis._lastMouseMoveEvent\n\t\t\t&& (\n\t\t\t\te.keyCodeIsTriggerKey // User just pressed Ctrl/Cmd (normal goto definition)\n\t\t\t\t|| (e.keyCodeIsSideBySideKey && e.hasTriggerModifier) // User pressed Ctrl/Cmd+Alt (goto definition to the side)\n\t\t\t)\n\t\t) {\n\t\t\tthis._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent, e]);\n\t\t} else if (e.hasTriggerModifier) {\n\t\t\tthis._onCancel.fire(); // remove decorations if user holds another key with ctrl/cmd to prevent accident goto declaration\n\t\t}\n\t}\n\n\tprivate _onEditorKeyUp(e: ClickLinkKeyboardEvent): void {\n\t\tif (e.keyCodeIsTriggerKey) {\n\t\t\tthis._onCancel.fire();\n\t\t}\n\t}\n\n\tprivate _resetHandler(): void {\n\t\tthis._lastMouseMoveEvent = null;\n\t\tthis._hasTriggerKeyOnMouseDown = false;\n\t\tthis._onCancel.fire();\n\t}\n}\n"]}
|
|
@@ -150,7 +150,7 @@ let GotoDefinitionAtPositionEditorContribution = class GotoDefinitionAtPositionE
|
|
|
150
150
|
combinedRange = Range.plusRange(combinedRange, originSelectionRange);
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
|
-
this.addDecoration(combinedRange, new MarkdownString().appendText(nls.localize(
|
|
153
|
+
this.addDecoration(combinedRange, new MarkdownString().appendText(nls.localize(1070, "Click to show {0} definitions.", results.length)));
|
|
154
154
|
}
|
|
155
155
|
else {
|
|
156
156
|
// Single result
|
|
@@ -242,7 +242,7 @@ let GotoDefinitionAtPositionEditorContribution = class GotoDefinitionAtPositionE
|
|
|
242
242
|
gotoDefinition(position, openToSide) {
|
|
243
243
|
this.editor.setPosition(position);
|
|
244
244
|
return this.editor.invokeWithinContext((accessor) => {
|
|
245
|
-
const canPeek = !openToSide && this.editor.getOption(
|
|
245
|
+
const canPeek = !openToSide && this.editor.getOption(101 /* EditorOption.definitionLinkOpensInPeek */) && !this.isInPeekEditor(accessor);
|
|
246
246
|
const action = new DefinitionAction({ openToSide, openInPeek: canPeek, muteMessage: true }, { title: { value: '', original: '' }, id: '', precondition: undefined });
|
|
247
247
|
return action.run(accessor);
|
|
248
248
|
});
|
|
@@ -34,7 +34,7 @@ import { OneReference } from '../referencesModel.js';
|
|
|
34
34
|
import { LayoutData, ReferenceWidget } from './referencesWidget.js';
|
|
35
35
|
import { EditorContextKeys } from '../../../../common/editorContextKeys.js';
|
|
36
36
|
import { InputFocusedContext } from '../../../../../platform/contextkey/common/contextkeys.js';
|
|
37
|
-
export const ctxReferenceSearchVisible = new RawContextKey('referenceSearchVisible', false, nls.localize(
|
|
37
|
+
export const ctxReferenceSearchVisible = new RawContextKey('referenceSearchVisible', false, nls.localize(1071, "Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));
|
|
38
38
|
let ReferencesController = class ReferencesController {
|
|
39
39
|
static { ReferencesController_1 = this; }
|
|
40
40
|
static { this.ID = 'editor.contrib.referencesController'; }
|
|
@@ -84,7 +84,7 @@ let ReferencesController = class ReferencesController {
|
|
|
84
84
|
const storageKey = 'peekViewLayout';
|
|
85
85
|
const data = LayoutData.fromJSON(this._storageService.get(storageKey, 0 /* StorageScope.PROFILE */, '{}'));
|
|
86
86
|
this._widget = this._instantiationService.createInstance(ReferenceWidget, this._editor, this._defaultTreeKeyboardSupport, data);
|
|
87
|
-
this._widget.setTitle(nls.localize(
|
|
87
|
+
this._widget.setTitle(nls.localize(1072, "Loading..."));
|
|
88
88
|
this._widget.show(range);
|
|
89
89
|
this._disposables.add(this._widget.onDidClose(() => {
|
|
90
90
|
modelPromise.cancel();
|
|
@@ -140,7 +140,7 @@ let ReferencesController = class ReferencesController {
|
|
|
140
140
|
if (this._widget && this._model && this._editor.hasModel()) { // might have been closed
|
|
141
141
|
// set title
|
|
142
142
|
if (!this._model.isEmpty) {
|
|
143
|
-
this._widget.setMetaTitle(nls.localize(
|
|
143
|
+
this._widget.setMetaTitle(nls.localize(1073, "{0} ({1})", this._model.title, this._model.references.length));
|
|
144
144
|
}
|
|
145
145
|
else {
|
|
146
146
|
this._widget.setMetaTitle('');
|
|
@@ -151,7 +151,7 @@ let ReferencesController = class ReferencesController {
|
|
|
151
151
|
const selection = this._model.nearestReference(uri, pos);
|
|
152
152
|
if (selection) {
|
|
153
153
|
return this._widget.setSelection(selection).then(() => {
|
|
154
|
-
if (this._widget && this._editor.getOption(
|
|
154
|
+
if (this._widget && this._editor.getOption(99 /* EditorOption.peekWidgetDefaultFocus */) === 'editor') {
|
|
155
155
|
this._widget.focusOnPreviewEditor();
|
|
156
156
|
}
|
|
157
157
|
});
|
|
@@ -115,10 +115,10 @@ let FileReferencesTemplate = class FileReferencesTemplate extends Disposable {
|
|
|
115
115
|
const len = element.children.length;
|
|
116
116
|
this.badge.setCount(len);
|
|
117
117
|
if (len > 1) {
|
|
118
|
-
this.badge.setTitleFormat(localize(
|
|
118
|
+
this.badge.setTitleFormat(localize(1074, "{0} references", len));
|
|
119
119
|
}
|
|
120
120
|
else {
|
|
121
|
-
this.badge.setTitleFormat(localize(
|
|
121
|
+
this.badge.setTitleFormat(localize(1075, "{0} reference", len));
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
};
|
|
@@ -192,7 +192,7 @@ export class OneReferenceRenderer {
|
|
|
192
192
|
//#endregion
|
|
193
193
|
export class AccessibilityProvider {
|
|
194
194
|
getWidgetAriaLabel() {
|
|
195
|
-
return localize(
|
|
195
|
+
return localize(1076, "References");
|
|
196
196
|
}
|
|
197
197
|
getAriaLabel(element) {
|
|
198
198
|
return element.ariaMessage;
|
|
@@ -301,7 +301,7 @@ let ReferenceWidget = class ReferenceWidget extends peekView.PeekViewWidget {
|
|
|
301
301
|
};
|
|
302
302
|
this._preview = this._instantiationService.createInstance(EmbeddedCodeEditorWidget, this._previewContainer, options, {}, this.editor);
|
|
303
303
|
dom.hide(this._previewContainer);
|
|
304
|
-
this._previewNotAvailableMessage = this._instantiationService.createInstance(TextModel, nls.localize(
|
|
304
|
+
this._previewNotAvailableMessage = this._instantiationService.createInstance(TextModel, nls.localize(1077, "no preview available"), PLAINTEXT_LANGUAGE_ID, TextModel.DEFAULT_CREATION_OPTIONS, null);
|
|
305
305
|
// tree
|
|
306
306
|
this._treeContainer = dom.append(containerElement, dom.$('div.ref-tree.inline'));
|
|
307
307
|
const treeOptions = {
|
|
@@ -415,7 +415,7 @@ let ReferenceWidget = class ReferenceWidget extends peekView.PeekViewWidget {
|
|
|
415
415
|
}
|
|
416
416
|
if (this._model.isEmpty) {
|
|
417
417
|
this.setTitle('');
|
|
418
|
-
this._messageContainer.innerText = nls.localize(
|
|
418
|
+
this._messageContainer.innerText = nls.localize(1078, "No results");
|
|
419
419
|
dom.show(this._messageContainer);
|
|
420
420
|
return Promise.resolve(undefined);
|
|
421
421
|
}
|
|
@@ -476,7 +476,7 @@ let ReferenceWidget = class ReferenceWidget extends peekView.PeekViewWidget {
|
|
|
476
476
|
this.setTitle(basenameOrAuthority(reference.uri), this._uriLabel.getUriLabel(dirname(reference.uri)));
|
|
477
477
|
}
|
|
478
478
|
else {
|
|
479
|
-
this.setTitle(nls.localize(
|
|
479
|
+
this.setTitle(nls.localize(1079, "References"));
|
|
480
480
|
}
|
|
481
481
|
const promise = this._textModelResolverService.createModelReference(reference.uri);
|
|
482
482
|
if (this._tree.getInput() === reference.parent) {
|
|
@@ -32,10 +32,10 @@ export class OneReference {
|
|
|
32
32
|
get ariaMessage() {
|
|
33
33
|
const preview = this.parent.getPreview(this)?.preview(this.range);
|
|
34
34
|
if (!preview) {
|
|
35
|
-
return localize(
|
|
35
|
+
return localize(1080, "in {0} on line {1} at column {2}", basename(this.uri), this.range.startLineNumber, this.range.startColumn);
|
|
36
36
|
}
|
|
37
37
|
else {
|
|
38
|
-
return localize(
|
|
38
|
+
return localize(1081, "{0} in {1} on line {2} at column {3}", preview.value, basename(this.uri), this.range.startLineNumber, this.range.startColumn);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -81,10 +81,10 @@ export class FileReferences {
|
|
|
81
81
|
get ariaMessage() {
|
|
82
82
|
const len = this.children.length;
|
|
83
83
|
if (len === 1) {
|
|
84
|
-
return localize(
|
|
84
|
+
return localize(1082, "1 symbol in {0}, full path {1}", basename(this.uri), this.uri.fsPath);
|
|
85
85
|
}
|
|
86
86
|
else {
|
|
87
|
-
return localize(
|
|
87
|
+
return localize(1083, "{0} symbols in {1}, full path {2}", len, basename(this.uri), this.uri.fsPath);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
async resolve(textModelResolverService) {
|
|
@@ -148,16 +148,16 @@ export class ReferencesModel {
|
|
|
148
148
|
}
|
|
149
149
|
get ariaMessage() {
|
|
150
150
|
if (this.isEmpty) {
|
|
151
|
-
return localize(
|
|
151
|
+
return localize(1084, "No results found");
|
|
152
152
|
}
|
|
153
153
|
else if (this.references.length === 1) {
|
|
154
|
-
return localize(
|
|
154
|
+
return localize(1085, "Found 1 symbol in {0}", this.references[0].uri.fsPath);
|
|
155
155
|
}
|
|
156
156
|
else if (this.groups.length === 1) {
|
|
157
|
-
return localize(
|
|
157
|
+
return localize(1086, "Found {0} symbols in {1}", this.references.length, this.groups[0].uri.fsPath);
|
|
158
158
|
}
|
|
159
159
|
else {
|
|
160
|
-
return localize(
|
|
160
|
+
return localize(1087, "Found {0} symbols in {1} files", this.references.length, this.groups.length);
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
nextOrPreviousReference(reference, next) {
|
|
@@ -24,7 +24,7 @@ import { createDecorator } from '../../../../platform/instantiation/common/insta
|
|
|
24
24
|
import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';
|
|
25
25
|
import { KeybindingsRegistry } from '../../../../platform/keybinding/common/keybindingsRegistry.js';
|
|
26
26
|
import { INotificationService } from '../../../../platform/notification/common/notification.js';
|
|
27
|
-
export const ctxHasSymbols = new RawContextKey('hasSymbols', false, localize(
|
|
27
|
+
export const ctxHasSymbols = new RawContextKey('hasSymbols', false, localize(1088, "Whether there are symbol locations that can be navigated via keyboard-only."));
|
|
28
28
|
export const ISymbolNavigationService = createDecorator('ISymbolNavigationService');
|
|
29
29
|
let SymbolNavigationService = class SymbolNavigationService {
|
|
30
30
|
constructor(contextKeyService, _editorService, _notificationService, _keybindingService) {
|
|
@@ -110,8 +110,8 @@ let SymbolNavigationService = class SymbolNavigationService {
|
|
|
110
110
|
this._currentMessage?.close();
|
|
111
111
|
const kb = this._keybindingService.lookupKeybinding('editor.gotoNextSymbolFromResult');
|
|
112
112
|
const message = kb
|
|
113
|
-
? localize(
|
|
114
|
-
: localize(
|
|
113
|
+
? localize(1089, "Symbol {0} of {1}, {2} for next", this._currentIdx + 1, this._currentModel.references.length, kb.getLabel())
|
|
114
|
+
: localize(1090, "Symbol {0} of {1}", this._currentIdx + 1, this._currentModel.references.length);
|
|
115
115
|
this._currentMessage = this._notificationService.status(message);
|
|
116
116
|
}
|
|
117
117
|
};
|
|
@@ -21,7 +21,7 @@ class DebugEditorGpuRendererAction extends EditorAction {
|
|
|
21
21
|
constructor() {
|
|
22
22
|
super({
|
|
23
23
|
id: 'editor.action.debugEditorGpuRenderer',
|
|
24
|
-
label: localize2(
|
|
24
|
+
label: localize2(1094, "Developer: Debug Editor GPU Renderer"),
|
|
25
25
|
// TODO: Why doesn't `ContextKeyExpr.equals('config:editor.experimentalGpuAcceleration', 'on')` work?
|
|
26
26
|
precondition: ContextKeyExpr.true(),
|
|
27
27
|
});
|
|
@@ -31,15 +31,15 @@ class DebugEditorGpuRendererAction extends EditorAction {
|
|
|
31
31
|
const quickInputService = accessor.get(IQuickInputService);
|
|
32
32
|
const choice = await quickInputService.pick([
|
|
33
33
|
{
|
|
34
|
-
label: localize(
|
|
34
|
+
label: localize(1091, "Log Texture Atlas Stats"),
|
|
35
35
|
id: 'logTextureAtlasStats',
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
|
-
label: localize(
|
|
38
|
+
label: localize(1092, "Save Texture Atlas"),
|
|
39
39
|
id: 'saveTextureAtlas',
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
|
-
label: localize(
|
|
42
|
+
label: localize(1093, "Draw Glyph"),
|
|
43
43
|
id: 'drawGlyph',
|
|
44
44
|
},
|
|
45
45
|
], { canPickMany: false });
|
|
@@ -15,7 +15,7 @@ export const PAGE_DOWN_HOVER_ACTION_ID = 'editor.action.pageDownHover';
|
|
|
15
15
|
export const GO_TO_TOP_HOVER_ACTION_ID = 'editor.action.goToTopHover';
|
|
16
16
|
export const GO_TO_BOTTOM_HOVER_ACTION_ID = 'editor.action.goToBottomHover';
|
|
17
17
|
export const INCREASE_HOVER_VERBOSITY_ACTION_ID = 'editor.action.increaseHoverVerbosityLevel';
|
|
18
|
-
export const INCREASE_HOVER_VERBOSITY_ACTION_LABEL = nls.localize(
|
|
18
|
+
export const INCREASE_HOVER_VERBOSITY_ACTION_LABEL = nls.localize(1095, "Increase Hover Verbosity Level");
|
|
19
19
|
export const DECREASE_HOVER_VERBOSITY_ACTION_ID = 'editor.action.decreaseHoverVerbosityLevel';
|
|
20
|
-
export const DECREASE_HOVER_VERBOSITY_ACTION_LABEL = nls.localize(
|
|
20
|
+
export const DECREASE_HOVER_VERBOSITY_ACTION_LABEL = nls.localize(1096, "Decrease Hover Verbosity Level");
|
|
21
21
|
//# sourceMappingURL=hoverActionIds.js.map
|
|
@@ -22,7 +22,7 @@ export class ShowOrFocusHoverAction extends EditorAction {
|
|
|
22
22
|
constructor() {
|
|
23
23
|
super({
|
|
24
24
|
id: SHOW_OR_FOCUS_HOVER_ACTION_ID,
|
|
25
|
-
label: nls.localize2(
|
|
25
|
+
label: nls.localize2(1100, "Show or Focus Hover"),
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
@@ -31,7 +31,7 @@ export class ShowOrFocusHoverAction extends EditorAction {
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
metadata: {
|
|
34
|
-
description: nls.localize2(
|
|
34
|
+
description: nls.localize2(1101, 'Show or focus the editor hover which shows documentation, references, and other content for a symbol at the current cursor position.'),
|
|
35
35
|
args: [{
|
|
36
36
|
name: 'args',
|
|
37
37
|
schema: {
|
|
@@ -41,9 +41,9 @@ export class ShowOrFocusHoverAction extends EditorAction {
|
|
|
41
41
|
description: 'Controls if and when the hover should take focus upon being triggered by this action.',
|
|
42
42
|
enum: [HoverFocusBehavior.NoAutoFocus, HoverFocusBehavior.FocusIfVisible, HoverFocusBehavior.AutoFocusImmediately],
|
|
43
43
|
enumDescriptions: [
|
|
44
|
-
nls.localize(
|
|
45
|
-
nls.localize(
|
|
46
|
-
nls.localize(
|
|
44
|
+
nls.localize(1097, 'The hover will not automatically take focus.'),
|
|
45
|
+
nls.localize(1098, 'The hover will take focus only if it is already visible.'),
|
|
46
|
+
nls.localize(1099, 'The hover will automatically take focus when it appears.'),
|
|
47
47
|
],
|
|
48
48
|
default: HoverFocusBehavior.FocusIfVisible,
|
|
49
49
|
}
|
|
@@ -98,7 +98,7 @@ export class ShowDefinitionPreviewHoverAction extends EditorAction {
|
|
|
98
98
|
constructor() {
|
|
99
99
|
super({
|
|
100
100
|
id: SHOW_DEFINITION_PREVIEW_HOVER_ACTION_ID,
|
|
101
|
-
label: nls.localize2(
|
|
101
|
+
label: nls.localize2(1102, "Show Definition Preview Hover"),
|
|
102
102
|
|
|
103
103
|
|
|
104
104
|
|
|
@@ -107,7 +107,7 @@ export class ShowDefinitionPreviewHoverAction extends EditorAction {
|
|
|
107
107
|
|
|
108
108
|
precondition: undefined,
|
|
109
109
|
metadata: {
|
|
110
|
-
description: nls.localize2(
|
|
110
|
+
description: nls.localize2(1103, 'Show the definition preview hover in the editor.'),
|
|
111
111
|
},
|
|
112
112
|
});
|
|
113
113
|
}
|
|
@@ -135,7 +135,7 @@ export class HideContentHoverAction extends EditorAction {
|
|
|
135
135
|
constructor() {
|
|
136
136
|
super({
|
|
137
137
|
id: HIDE_HOVER_ACTION_ID,
|
|
138
|
-
label: nls.localize2(
|
|
138
|
+
label: nls.localize2(1104, "Hide Hover"),
|
|
139
139
|
|
|
140
140
|
|
|
141
141
|
|
|
@@ -151,7 +151,7 @@ export class ScrollUpHoverAction extends EditorAction {
|
|
|
151
151
|
constructor() {
|
|
152
152
|
super({
|
|
153
153
|
id: SCROLL_UP_HOVER_ACTION_ID,
|
|
154
|
-
label: nls.localize2(
|
|
154
|
+
label: nls.localize2(1105, "Scroll Up Hover"),
|
|
155
155
|
|
|
156
156
|
|
|
157
157
|
|
|
@@ -164,7 +164,7 @@ export class ScrollUpHoverAction extends EditorAction {
|
|
|
164
164
|
weight: 100 /* KeybindingWeight.EditorContrib */
|
|
165
165
|
},
|
|
166
166
|
metadata: {
|
|
167
|
-
description: nls.localize2(
|
|
167
|
+
description: nls.localize2(1106, 'Scroll up the editor hover.')
|
|
168
168
|
},
|
|
169
169
|
});
|
|
170
170
|
}
|
|
@@ -180,7 +180,7 @@ export class ScrollDownHoverAction extends EditorAction {
|
|
|
180
180
|
constructor() {
|
|
181
181
|
super({
|
|
182
182
|
id: SCROLL_DOWN_HOVER_ACTION_ID,
|
|
183
|
-
label: nls.localize2(
|
|
183
|
+
label: nls.localize2(1107, "Scroll Down Hover"),
|
|
184
184
|
|
|
185
185
|
|
|
186
186
|
|
|
@@ -193,7 +193,7 @@ export class ScrollDownHoverAction extends EditorAction {
|
|
|
193
193
|
weight: 100 /* KeybindingWeight.EditorContrib */
|
|
194
194
|
},
|
|
195
195
|
metadata: {
|
|
196
|
-
description: nls.localize2(
|
|
196
|
+
description: nls.localize2(1108, 'Scroll down the editor hover.'),
|
|
197
197
|
},
|
|
198
198
|
});
|
|
199
199
|
}
|
|
@@ -209,7 +209,7 @@ export class ScrollLeftHoverAction extends EditorAction {
|
|
|
209
209
|
constructor() {
|
|
210
210
|
super({
|
|
211
211
|
id: SCROLL_LEFT_HOVER_ACTION_ID,
|
|
212
|
-
label: nls.localize2(
|
|
212
|
+
label: nls.localize2(1109, "Scroll Left Hover"),
|
|
213
213
|
|
|
214
214
|
|
|
215
215
|
|
|
@@ -222,7 +222,7 @@ export class ScrollLeftHoverAction extends EditorAction {
|
|
|
222
222
|
weight: 100 /* KeybindingWeight.EditorContrib */
|
|
223
223
|
},
|
|
224
224
|
metadata: {
|
|
225
|
-
description: nls.localize2(
|
|
225
|
+
description: nls.localize2(1110, 'Scroll left the editor hover.'),
|
|
226
226
|
},
|
|
227
227
|
});
|
|
228
228
|
}
|
|
@@ -238,7 +238,7 @@ export class ScrollRightHoverAction extends EditorAction {
|
|
|
238
238
|
constructor() {
|
|
239
239
|
super({
|
|
240
240
|
id: SCROLL_RIGHT_HOVER_ACTION_ID,
|
|
241
|
-
label: nls.localize2(
|
|
241
|
+
label: nls.localize2(1111, "Scroll Right Hover"),
|
|
242
242
|
|
|
243
243
|
|
|
244
244
|
|
|
@@ -251,7 +251,7 @@ export class ScrollRightHoverAction extends EditorAction {
|
|
|
251
251
|
weight: 100 /* KeybindingWeight.EditorContrib */
|
|
252
252
|
},
|
|
253
253
|
metadata: {
|
|
254
|
-
description: nls.localize2(
|
|
254
|
+
description: nls.localize2(1112, 'Scroll right the editor hover.')
|
|
255
255
|
},
|
|
256
256
|
});
|
|
257
257
|
}
|
|
@@ -267,7 +267,7 @@ export class PageUpHoverAction extends EditorAction {
|
|
|
267
267
|
constructor() {
|
|
268
268
|
super({
|
|
269
269
|
id: PAGE_UP_HOVER_ACTION_ID,
|
|
270
|
-
label: nls.localize2(
|
|
270
|
+
label: nls.localize2(1113, "Page Up Hover"),
|
|
271
271
|
|
|
272
272
|
|
|
273
273
|
|
|
@@ -281,7 +281,7 @@ export class PageUpHoverAction extends EditorAction {
|
|
|
281
281
|
weight: 100 /* KeybindingWeight.EditorContrib */
|
|
282
282
|
},
|
|
283
283
|
metadata: {
|
|
284
|
-
description: nls.localize2(
|
|
284
|
+
description: nls.localize2(1114, 'Page up the editor hover.'),
|
|
285
285
|
},
|
|
286
286
|
});
|
|
287
287
|
}
|
|
@@ -297,7 +297,7 @@ export class PageDownHoverAction extends EditorAction {
|
|
|
297
297
|
constructor() {
|
|
298
298
|
super({
|
|
299
299
|
id: PAGE_DOWN_HOVER_ACTION_ID,
|
|
300
|
-
label: nls.localize2(
|
|
300
|
+
label: nls.localize2(1115, "Page Down Hover"),
|
|
301
301
|
|
|
302
302
|
|
|
303
303
|
|
|
@@ -311,7 +311,7 @@ export class PageDownHoverAction extends EditorAction {
|
|
|
311
311
|
weight: 100 /* KeybindingWeight.EditorContrib */
|
|
312
312
|
},
|
|
313
313
|
metadata: {
|
|
314
|
-
description: nls.localize2(
|
|
314
|
+
description: nls.localize2(1116, 'Page down the editor hover.'),
|
|
315
315
|
},
|
|
316
316
|
});
|
|
317
317
|
}
|
|
@@ -327,7 +327,7 @@ export class GoToTopHoverAction extends EditorAction {
|
|
|
327
327
|
constructor() {
|
|
328
328
|
super({
|
|
329
329
|
id: GO_TO_TOP_HOVER_ACTION_ID,
|
|
330
|
-
label: nls.localize2(
|
|
330
|
+
label: nls.localize2(1117, "Go To Top Hover"),
|
|
331
331
|
|
|
332
332
|
|
|
333
333
|
|
|
@@ -341,7 +341,7 @@ export class GoToTopHoverAction extends EditorAction {
|
|
|
341
341
|
weight: 100 /* KeybindingWeight.EditorContrib */
|
|
342
342
|
},
|
|
343
343
|
metadata: {
|
|
344
|
-
description: nls.localize2(
|
|
344
|
+
description: nls.localize2(1118, 'Go to the top of the editor hover.'),
|
|
345
345
|
},
|
|
346
346
|
});
|
|
347
347
|
}
|
|
@@ -357,7 +357,7 @@ export class GoToBottomHoverAction extends EditorAction {
|
|
|
357
357
|
constructor() {
|
|
358
358
|
super({
|
|
359
359
|
id: GO_TO_BOTTOM_HOVER_ACTION_ID,
|
|
360
|
-
label: nls.localize2(
|
|
360
|
+
label: nls.localize2(1119, "Go To Bottom Hover"),
|
|
361
361
|
|
|
362
362
|
|
|
363
363
|
|
|
@@ -371,7 +371,7 @@ export class GoToBottomHoverAction extends EditorAction {
|
|
|
371
371
|
weight: 100 /* KeybindingWeight.EditorContrib */
|
|
372
372
|
},
|
|
373
373
|
metadata: {
|
|
374
|
-
description: nls.localize2(
|
|
374
|
+
description: nls.localize2(1120, 'Go to the bottom of the editor hover.')
|
|
375
375
|
},
|
|
376
376
|
});
|
|
377
377
|
}
|
|
@@ -37,8 +37,8 @@ import { AsyncIterableProducer } from '../../../../base/common/async.js';
|
|
|
37
37
|
import { getHoverProviderResultsAsAsyncIterable } from './getHover.js';
|
|
38
38
|
import { ICommandService } from '../../../../platform/commands/common/commands.js';
|
|
39
39
|
const $ = dom.$;
|
|
40
|
-
const increaseHoverVerbosityIcon = registerIcon('hover-increase-verbosity', Codicon.add, nls.localize(
|
|
41
|
-
const decreaseHoverVerbosityIcon = registerIcon('hover-decrease-verbosity', Codicon.remove, nls.localize(
|
|
40
|
+
const increaseHoverVerbosityIcon = registerIcon('hover-increase-verbosity', Codicon.add, nls.localize(1121, 'Icon for increaseing hover verbosity.'));
|
|
41
|
+
const decreaseHoverVerbosityIcon = registerIcon('hover-decrease-verbosity', Codicon.remove, nls.localize(1122, 'Icon for decreasing hover verbosity.'));
|
|
42
42
|
export class MarkdownHover {
|
|
43
43
|
constructor(owner, range, contents, isBeforeContent, ordinal, source = undefined) {
|
|
44
44
|
this.owner = owner;
|
|
@@ -82,7 +82,7 @@ let MarkdownHoverParticipant = class MarkdownHoverParticipant {
|
|
|
82
82
|
this.hoverOrdinal = 3;
|
|
83
83
|
}
|
|
84
84
|
createLoadingMessage(anchor) {
|
|
85
|
-
return new MarkdownHover(this, anchor.range, [new MarkdownString().appendText(nls.localize(
|
|
85
|
+
return new MarkdownHover(this, anchor.range, [new MarkdownString().appendText(nls.localize(1123, "Loading..."))], false, 2000);
|
|
86
86
|
}
|
|
87
87
|
computeSync(anchor, lineDecorations) {
|
|
88
88
|
if (!this._editor.hasModel() || anchor.type !== 1 /* HoverAnchorType.Range */) {
|
|
@@ -95,7 +95,7 @@ let MarkdownHoverParticipant = class MarkdownHoverParticipant {
|
|
|
95
95
|
let index = 1000;
|
|
96
96
|
const lineLength = model.getLineLength(lineNumber);
|
|
97
97
|
const languageId = model.getLanguageIdAtPosition(anchor.range.startLineNumber, anchor.range.startColumn);
|
|
98
|
-
const stopRenderingLineAfter = this._editor.getOption(
|
|
98
|
+
const stopRenderingLineAfter = this._editor.getOption(133 /* EditorOption.stopRenderingLineAfter */);
|
|
99
99
|
const maxTokenizationLineLength = this._configurationService.getValue('editor.maxTokenizationLineLength', {
|
|
100
100
|
overrideIdentifier: languageId
|
|
101
101
|
});
|
|
@@ -103,12 +103,12 @@ let MarkdownHoverParticipant = class MarkdownHoverParticipant {
|
|
|
103
103
|
if (stopRenderingLineAfter >= 0 && lineLength > stopRenderingLineAfter && anchor.range.startColumn >= stopRenderingLineAfter) {
|
|
104
104
|
stopRenderingMessage = true;
|
|
105
105
|
result.push(new MarkdownHover(this, anchor.range, [{
|
|
106
|
-
value: nls.localize(
|
|
106
|
+
value: nls.localize(1124, "Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")
|
|
107
107
|
}], false, index++));
|
|
108
108
|
}
|
|
109
109
|
if (!stopRenderingMessage && typeof maxTokenizationLineLength === 'number' && lineLength >= maxTokenizationLineLength) {
|
|
110
110
|
result.push(new MarkdownHover(this, anchor.range, [{
|
|
111
|
-
value: nls.localize(
|
|
111
|
+
value: nls.localize(1125, "Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")
|
|
112
112
|
}], false, index++));
|
|
113
113
|
}
|
|
114
114
|
let isBeforeContent = false;
|
|
@@ -393,14 +393,14 @@ export function labelForHoverVerbosityAction(keybindingService, action) {
|
|
|
393
393
|
case HoverVerbosityAction.Increase: {
|
|
394
394
|
const kb = keybindingService.lookupKeybinding(INCREASE_HOVER_VERBOSITY_ACTION_ID);
|
|
395
395
|
return kb ?
|
|
396
|
-
nls.localize(
|
|
397
|
-
nls.localize(
|
|
396
|
+
nls.localize(1126, "Increase Hover Verbosity ({0})", kb.getLabel()) :
|
|
397
|
+
nls.localize(1127, "Increase Hover Verbosity");
|
|
398
398
|
}
|
|
399
399
|
case HoverVerbosityAction.Decrease: {
|
|
400
400
|
const kb = keybindingService.lookupKeybinding(DECREASE_HOVER_VERBOSITY_ACTION_ID);
|
|
401
401
|
return kb ?
|
|
402
|
-
nls.localize(
|
|
403
|
-
nls.localize(
|
|
402
|
+
nls.localize(1128, "Decrease Hover Verbosity ({0})", kb.getLabel()) :
|
|
403
|
+
nls.localize(1129, "Decrease Hover Verbosity");
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
406
|
}
|