monaco-editor-core 0.56.0-dev-20251217 → 0.56.0-dev-20251219
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/nls.keys.json +1 -1
- package/esm/nls.messages.cs.js +2 -2
- package/esm/nls.messages.de.js +2 -2
- package/esm/nls.messages.es.js +2 -2
- package/esm/nls.messages.fr.js +2 -2
- package/esm/nls.messages.it.js +2 -2
- package/esm/nls.messages.ja.js +2 -2
- package/esm/nls.messages.js +1 -1
- package/esm/nls.messages.json +1 -1
- package/esm/nls.messages.ko.js +2 -2
- package/esm/nls.messages.pl.js +2 -2
- package/esm/nls.messages.pt-br.js +2 -2
- package/esm/nls.messages.ru.js +2 -2
- package/esm/nls.messages.tr.js +2 -2
- package/esm/nls.messages.zh-cn.js +2 -2
- package/esm/nls.messages.zh-tw.js +2 -2
- package/esm/nls.metadata.json +6 -2
- package/esm/vs/base/browser/ui/actionbar/actionViewItems.js.map +1 -1
- package/esm/vs/base/browser/ui/findinput/findInput.js +6 -1
- package/esm/vs/base/browser/ui/findinput/findInput.js.map +1 -1
- package/esm/vs/base/browser/ui/inputbox/inputBox.js +17 -1
- package/esm/vs/base/browser/ui/inputbox/inputBox.js.map +1 -1
- package/esm/vs/base/browser/ui/toggle/toggle.js +78 -6
- package/esm/vs/base/browser/ui/toggle/toggle.js.map +1 -1
- package/esm/vs/base/common/fuzzyScorer.js +3 -2
- package/esm/vs/base/common/fuzzyScorer.js.map +1 -1
- package/esm/vs/editor/browser/services/editorWorkerService.js +6 -2
- package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
- package/esm/vs/editor/common/config/editorConfigurationSchema.js +49 -47
- package/esm/vs/editor/common/config/editorConfigurationSchema.js.map +1 -1
- package/esm/vs/editor/common/config/editorOptions.js +410 -410
- package/esm/vs/editor/common/core/editorColorRegistry.js +70 -69
- package/esm/vs/editor/common/core/editorColorRegistry.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursorTypeEditOperations.js +3 -3
- package/esm/vs/editor/common/cursor/cursorTypeEditOperations.js.map +1 -1
- package/esm/vs/editor/common/editorContextKeys.js +47 -47
- 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 +11 -11
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
- package/esm/vs/editor/common/viewModel/viewModelImpl.js +4 -15
- package/esm/vs/editor/common/viewModel/viewModelImpl.js.map +1 -1
- package/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
- package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +18 -9
- package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js.map +1 -1
- 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/hoverColorPicker/hoverColorPickerParticipant.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 +10 -10
- 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/folding.js.map +1 -1
- package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
- package/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
- package/esm/vs/editor/contrib/format/browser/formatActions.js +2 -2
- package/esm/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
- package/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
- package/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/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/hoverCopyButton.js +2 -2
- 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 +21 -21
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +13 -13
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js +4 -4
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +6 -6
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js +3 -3
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -20
- package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
- package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
- package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +31 -31
- 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 +25 -27
- 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/suggest/browser/suggest.js +9 -9
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js +11 -11
- 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 +3 -3
- 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/hover/browser/hoverWidget.js +1 -1
- package/esm/vs/platform/hover/browser/updatableHoverWidget.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 +8 -8
- package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
- package/esm/vs/platform/quickinput/browser/media/quickInput.css +38 -4
- package/esm/vs/platform/quickinput/browser/quickInput.js +42 -14
- package/esm/vs/platform/quickinput/browser/quickInput.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
- package/esm/vs/platform/quickinput/browser/quickInputBox.js +13 -1
- package/esm/vs/platform/quickinput/browser/quickInputBox.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputController.js +22 -12
- package/esm/vs/platform/quickinput/browser/quickInputController.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputList.js +17 -12
- package/esm/vs/platform/quickinput/browser/quickInputList.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputUtils.js +36 -8
- package/esm/vs/platform/quickinput/browser/quickInputUtils.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeController.js +3 -3
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeController.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js +8 -4
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js.map +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 +18 -18
- 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 +16 -16
- 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 +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,qDAAqD,CAAC;AAExG,OAAO,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAGzD,OAAO,EAAE,6BAA6B,EAAE,MAAM,+DAA+D,CAAC;AAE9G,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAuB,MAAM,2CAA2C,CAAC;AAC7F,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAGjE,OAAO,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AAEjE,IAAK,UAIJ;AAJD,WAAK,UAAU;IACd,uBAAS,CAAA;IACT,yBAAW,CAAA;IACX,6BAAe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SAAS,EAAE,KAAK,CAAC,CAAC;IAC5F,CAAC;IAEO,KAAK,CAAC,uBAAuB,CAAC,WAAiC,EAAE,SAAqB,EAAE,QAAkB,EAAE,OAAe,EAAE,OAAe;QACnJ,iIAAiI;QACjI,qDAAqD;QACrD,yBAAyB;QACzB,IAAI;QACJ,mEAAmE;QAEnE,IAAI,CAAC;YACJ,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,cAAc,CAAa,kCAAkC,EAAE,SAAS,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;YAC7K,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;gBAC1B,OAAO,UAAU,CAAC,EAAE,CAAC;YACtB,CAAC;iBAAM,CAAC;gBACP,OAAO,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACtC,CAAC;QACF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,OAAO,UAAU,CAAC,EAAE,CAAC;QACtB,CAAC;IACF,CAAC;CACD,CAAA;AAnIY,qBAAqB;IAO/B,WAAA,eAAe,CAAA;IACf,WAAA,wBAAwB,CAAA;IACxB,WAAA,6BAA6B,CAAA;IAC7B,WAAA,gBAAgB,CAAA;GAVN,qBAAqB,CAmIjC","file":"renameSymbolProcessor.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 { raceTimeout } from '../../../../../base/common/async.js';\nimport { CancellationTokenSource } from '../../../../../base/common/cancellation.js';\nimport { LcsDiff, StringDiffSequence } from '../../../../../base/common/diff/diff.js';\nimport { Disposable } from '../../../../../base/common/lifecycle.js';\nimport { localize } from '../../../../../nls.js';\nimport { CommandsRegistry, ICommandService } from '../../../../../platform/commands/common/commands.js';\nimport { ServicesAccessor } from '../../../../browser/editorExtensions.js';\nimport { IBulkEditService } from '../../../../browser/services/bulkEditService.js';\nimport { TextReplacement } from '../../../../common/core/edits/textEdit.js';\nimport { Position } from '../../../../common/core/position.js';\nimport { Range } from '../../../../common/core/range.js';\nimport { StandardTokenType } from '../../../../common/encodedTokenAttributes.js';\nimport { Command, type Rejection, type WorkspaceEdit } from '../../../../common/languages.js';\nimport { ILanguageConfigurationService } from '../../../../common/languages/languageConfigurationRegistry.js';\nimport { ITextModel } from '../../../../common/model.js';\nimport { ILanguageFeaturesService } from '../../../../common/services/languageFeatures.js';\nimport { EditSources, TextModelEditSource } from '../../../../common/textModelEditSource.js';\nimport { hasProvider, rawRename } from '../../../rename/browser/rename.js';\nimport { renameSymbolCommandId } from '../controller/commandIds.js';\nimport { InlineSuggestionItem } from './inlineSuggestionItem.js';\nimport { IInlineSuggestDataActionEdit } from './provideInlineCompletions.js';\nimport { InlineSuggestAlternativeAction } from './InlineSuggestAlternativeAction.js';\nimport { Codicon } from '../../../../../base/common/codicons.js';\n\nenum RenameKind {\n\tno = 'no',\n\tyes = 'yes',\n\tmaybe = 'maybe'\n}\n\nnamespace RenameKind {\n\texport function fromString(value: string): RenameKind {\n\t\tswitch (value) {\n\t\t\tcase 'no': return RenameKind.no;\n\t\t\tcase 'yes': return RenameKind.yes;\n\t\t\tcase 'maybe': return RenameKind.maybe;\n\t\t\tdefault: return RenameKind.no;\n\t\t}\n\t}\n}\n\nexport type RenameEdits = {\n\trenames: { edits: TextReplacement[]; position: Position; oldName: string; newName: string };\n\tothers: { edits: TextReplacement[] };\n};\n\nexport class RenameInferenceEngine {\n\n\tpublic constructor() {\n\t}\n\n\tpublic inferRename(textModel: ITextModel, editRange: Range, insertText: string, wordDefinition: RegExp): RenameEdits | undefined {\n\n\t\t// Extend the edit range to full lines to capture prefix/suffix renames\n\t\tconst extendedRange = new Range(editRange.startLineNumber, 1, editRange.endLineNumber, textModel.getLineMaxColumn(editRange.endLineNumber));\n\t\tconst startDiff = editRange.startColumn - extendedRange.startColumn;\n\t\tconst endDiff = extendedRange.endColumn - editRange.endColumn;\n\n\t\tconst originalText = textModel.getValueInRange(extendedRange);\n\t\tconst modifiedText =\n\t\t\ttextModel.getValueInRange(new Range(extendedRange.startLineNumber, extendedRange.startColumn, extendedRange.startLineNumber, extendedRange.startColumn + startDiff)) +\n\t\t\tinsertText +\n\t\t\ttextModel.getValueInRange(new Range(extendedRange.endLineNumber, extendedRange.endColumn - endDiff, extendedRange.endLineNumber, extendedRange.endColumn));\n\n\t\t// console.log(`Original: ${originalText} \\nmodified: ${modifiedText}`);\n\t\tconst others: TextReplacement[] = [];\n\t\tconst renames: TextReplacement[] = [];\n\t\tlet oldName: string | undefined = undefined;\n\t\tlet newName: string | undefined = undefined;\n\t\tlet position: Position | undefined = undefined;\n\n\t\tconst nesOffset = textModel.getOffsetAt(extendedRange.getStartPosition());\n\n\t\tconst { changes: originalChanges } = (new LcsDiff(new StringDiffSequence(originalText), new StringDiffSequence(modifiedText))).ComputeDiff(true);\n\t\tif (originalChanges.length === 0) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Fold the changes to larger changes if the gap between two changes is a full word. This covers cases like renaming\n\t\t// `foo` to `abcfoobar`\n\t\tconst changes: typeof originalChanges = [];\n\t\tfor (const change of originalChanges) {\n\t\t\tif (changes.length === 0) {\n\t\t\t\tchanges.push(change);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst lastChange = changes[changes.length - 1];\n\t\t\tconst gapOriginalLength = change.originalStart - (lastChange.originalStart + lastChange.originalLength);\n\n\t\t\tif (gapOriginalLength > 0) {\n\t\t\t\tconst gapStartOffset = nesOffset + lastChange.originalStart + lastChange.originalLength;\n\t\t\t\tconst gapStartPos = textModel.getPositionAt(gapStartOffset);\n\t\t\t\tconst wordRange = textModel.getWordAtPosition(gapStartPos);\n\n\t\t\t\tif (wordRange) {\n\t\t\t\t\tconst wordStartOffset = textModel.getOffsetAt(new Position(gapStartPos.lineNumber, wordRange.startColumn));\n\t\t\t\t\tconst wordEndOffset = textModel.getOffsetAt(new Position(gapStartPos.lineNumber, wordRange.endColumn));\n\t\t\t\t\tconst gapEndOffset = gapStartOffset + gapOriginalLength;\n\n\t\t\t\t\tif (wordStartOffset <= gapStartOffset && gapEndOffset <= wordEndOffset && wordStartOffset <= gapEndOffset && gapEndOffset <= wordEndOffset) {\n\t\t\t\t\t\tlastChange.originalLength = (change.originalStart + change.originalLength) - lastChange.originalStart;\n\t\t\t\t\t\tlastChange.modifiedLength = (change.modifiedStart + change.modifiedLength) - lastChange.modifiedStart;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tchanges.push(change);\n\t\t}\n\n\t\tlet tokenDiff: number = 0;\n\t\tfor (const change of changes) {\n\t\t\tconst originalTextSegment = originalText.substring(change.originalStart, change.originalStart + change.originalLength);\n\t\t\tconst insertedTextSegment = modifiedText.substring(change.modifiedStart, change.modifiedStart + change.modifiedLength);\n\n\t\t\tconst startOffset = nesOffset + change.originalStart;\n\t\t\tconst startPos = textModel.getPositionAt(startOffset);\n\n\t\t\tconst endOffset = startOffset + change.originalLength;\n\t\t\tconst endPos = textModel.getPositionAt(endOffset);\n\n\t\t\tconst range = Range.fromPositions(startPos, endPos);\n\n\t\t\tconst diff = insertedTextSegment.length - change.originalLength;\n\n\t\t\t// If the original text segment contains a whitespace character we don't consider this a rename since\n\t\t\t// identifiers in programming languages can't contain whitespace characters usually\n\t\t\tif (/\\s/.test(originalTextSegment)) {\n\t\t\t\tothers.push(new TextReplacement(range, insertedTextSegment));\n\t\t\t\ttokenDiff += diff;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (originalTextSegment.length > 0) {\n\t\t\t\twordDefinition.lastIndex = 0;\n\t\t\t\tconst match = wordDefinition.exec(originalTextSegment);\n\t\t\t\tif (match === null || match.index !== 0 || match[0].length !== originalTextSegment.length) {\n\t\t\t\t\tothers.push(new TextReplacement(range, insertedTextSegment));\n\t\t\t\t\ttokenDiff += diff;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If the inserted text contains a whitespace character we don't consider this a rename since identifiers in\n\t\t\t// programming languages can't contain whitespace characters usually\n\t\t\tif (/\\s/.test(insertedTextSegment)) {\n\t\t\t\tothers.push(new TextReplacement(range, insertedTextSegment));\n\t\t\t\ttokenDiff += diff;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (insertedTextSegment.length > 0) {\n\t\t\t\twordDefinition.lastIndex = 0;\n\t\t\t\tconst match = wordDefinition.exec(insertedTextSegment);\n\t\t\t\tif (match === null || match.index !== 0 || match[0].length !== insertedTextSegment.length) {\n\t\t\t\t\tothers.push(new TextReplacement(range, insertedTextSegment));\n\t\t\t\t\ttokenDiff += diff;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst wordRange = textModel.getWordAtPosition(startPos);\n\t\t\t// If we don't have a word range at the start position of the current document then we\n\t\t\t// don't treat it as a rename assuming that the rename refactoring will fail as well since\n\t\t\t// there can't be an identifier at that position.\n\t\t\tif (wordRange === null) {\n\t\t\t\tothers.push(new TextReplacement(range, insertedTextSegment));\n\t\t\t\ttokenDiff += diff;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst originalStartColumn = change.originalStart + 1;\n\t\t\tconst isInsertion = change.originalLength === 0 && change.modifiedLength > 0;\n\t\t\tlet tokenInfo: { type: StandardTokenType; range: Range };\n\t\t\t// Word info is left aligned whereas token info is right aligned for insertions.\n\t\t\t// We prefer a suffix insertion for renames so we take the word range for the token info.\n\t\t\tif (isInsertion && originalStartColumn === wordRange.endColumn && wordRange.endColumn > wordRange.startColumn) {\n\t\t\t\ttokenInfo = this.getTokenAtPosition(textModel, new Position(startPos.lineNumber, wordRange.startColumn));\n\t\t\t} else {\n\t\t\t\ttokenInfo = this.getTokenAtPosition(textModel, startPos);\n\t\t\t}\n\t\t\tif (wordRange.startColumn !== tokenInfo.range.startColumn || wordRange.endColumn !== tokenInfo.range.endColumn) {\n\t\t\t\tothers.push(new TextReplacement(range, insertedTextSegment));\n\t\t\t\ttokenDiff += diff;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (tokenInfo.type === StandardTokenType.Other) {\n\n\t\t\t\tlet identifier = textModel.getValueInRange(tokenInfo.range);\n\t\t\t\tif (identifier.length === 0) {\n\t\t\t\t\tothers.push(new TextReplacement(range, insertedTextSegment));\n\t\t\t\t\ttokenDiff += diff;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (oldName === undefined) {\n\t\t\t\t\toldName = identifier;\n\t\t\t\t} else if (oldName !== identifier) {\n\t\t\t\t\tothers.push(new TextReplacement(range, insertedTextSegment));\n\t\t\t\t\ttokenDiff += diff;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// We assume that the new name starts at the same position as the old name from a token range perspective.\n\t\t\t\tconst tokenStartPos = textModel.getOffsetAt(tokenInfo.range.getStartPosition()) - nesOffset + tokenDiff;\n\t\t\t\tconst tokenEndPos = textModel.getOffsetAt(tokenInfo.range.getEndPosition()) - nesOffset + tokenDiff;\n\t\t\t\tidentifier = modifiedText.substring(tokenStartPos, tokenEndPos + diff);\n\t\t\t\tif (identifier.length === 0) {\n\t\t\t\t\tothers.push(new TextReplacement(range, insertedTextSegment));\n\t\t\t\t\ttokenDiff += diff;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (newName === undefined) {\n\t\t\t\t\tnewName = identifier;\n\t\t\t\t} else if (newName !== identifier) {\n\t\t\t\t\tothers.push(new TextReplacement(range, insertedTextSegment));\n\t\t\t\t\ttokenDiff += diff;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (position === undefined) {\n\t\t\t\t\tposition = tokenInfo.range.getStartPosition();\n\t\t\t\t}\n\n\t\t\t\tif (oldName !== undefined && newName !== undefined && oldName.length > 0 && newName.length > 0 && oldName !== newName) {\n\t\t\t\t\trenames.push(new TextReplacement(tokenInfo.range, newName));\n\t\t\t\t} else {\n\t\t\t\t\trenames.push(new TextReplacement(range, insertedTextSegment));\n\t\t\t\t}\n\t\t\t\ttokenDiff += diff;\n\t\t\t} else {\n\t\t\t\tothers.push(new TextReplacement(range, insertedTextSegment));\n\t\t\t\ttokenDiff += insertedTextSegment.length - change.originalLength;\n\t\t\t}\n\t\t}\n\n\t\tif (oldName === undefined || newName === undefined || position === undefined || oldName.length === 0 || newName.length === 0 || oldName === newName) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\twordDefinition.lastIndex = 0;\n\t\tlet match = wordDefinition.exec(oldName);\n\t\tif (match === null || match.index !== 0 || match[0].length !== oldName.length) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\twordDefinition.lastIndex = 0;\n\t\tmatch = wordDefinition.exec(newName);\n\t\tif (match === null || match.index !== 0 || match[0].length !== newName.length) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn {\n\t\t\trenames: { edits: renames, position, oldName, newName },\n\t\t\tothers: { edits: others }\n\t\t};\n\t}\n\n\n\tprotected getTokenAtPosition(textModel: ITextModel, position: Position): { type: StandardTokenType; range: Range } {\n\t\ttextModel.tokenization.tokenizeIfCheap(position.lineNumber);\n\t\tconst tokens = textModel.tokenization.getLineTokens(position.lineNumber);\n\t\tconst idx = tokens.findTokenIndexAtOffset(position.column - 1);\n\t\treturn {\n\t\t\ttype: tokens.getStandardTokenType(idx),\n\t\t\trange: new Range(position.lineNumber, 1 + tokens.getStartOffset(idx), position.lineNumber, 1 + tokens.getEndOffset(idx))\n\t\t};\n\t}\n}\n\nclass RenameSymbolRunnable {\n\n\tprivate readonly _cancellationTokenSource: CancellationTokenSource;\n\tprivate readonly _promise: Promise<WorkspaceEdit & Rejection>;\n\tprivate _result: WorkspaceEdit & Rejection | undefined = undefined;\n\n\tconstructor(languageFeaturesService: ILanguageFeaturesService, textModel: ITextModel, position: Position, newName: string) {\n\t\tthis._cancellationTokenSource = new CancellationTokenSource();\n\t\tthis._promise = rawRename(languageFeaturesService.renameProvider, textModel, position, newName, this._cancellationTokenSource.token);\n\t}\n\n\tpublic cancel(): void {\n\t\tthis._cancellationTokenSource.cancel();\n\t}\n\n\tpublic async getCount(): Promise<number> {\n\t\tconst result = await this.getResult();\n\t\tif (result === undefined) {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn result.edits.length;\n\t}\n\n\tpublic async getWorkspaceEdit(): Promise<WorkspaceEdit | undefined> {\n\t\treturn this.getResult();\n\t}\n\n\tprivate async getResult(): Promise<WorkspaceEdit | undefined> {\n\t\tif (this._result === undefined) {\n\t\t\tthis._result = await this._promise;\n\t\t}\n\t\tif (this._result.rejectReason) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn this._result;\n\t}\n}\n\nexport class RenameSymbolProcessor extends Disposable {\n\n\tprivate readonly _renameInferenceEngine = new RenameInferenceEngine();\n\n\tprivate _renameRunnable: { id: string; runnable: RenameSymbolRunnable } | undefined;\n\n\tconstructor(\n\t\t@ICommandService private readonly _commandService: ICommandService,\n\t\t@ILanguageFeaturesService private readonly _languageFeaturesService: ILanguageFeaturesService,\n\t\t@ILanguageConfigurationService private readonly _languageConfigurationService: ILanguageConfigurationService,\n\t\t@IBulkEditService bulkEditService: IBulkEditService,\n\t) {\n\t\tsuper();\n\t\tconst self = this;\n\t\tthis._register(CommandsRegistry.registerCommand(renameSymbolCommandId, async (_: ServicesAccessor, textModel: ITextModel, position: Position, newName: string, source: TextModelEditSource, id: string) => {\n\t\t\tif (self._renameRunnable === undefined) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tlet workspaceEdit: WorkspaceEdit | undefined;\n\t\t\tif (self._renameRunnable.id !== id) {\n\t\t\t\tself._renameRunnable.runnable.cancel();\n\t\t\t\tself._renameRunnable = undefined;\n\t\t\t\tconst runnable = new RenameSymbolRunnable(self._languageFeaturesService, textModel, position, newName);\n\t\t\t\tworkspaceEdit = await runnable.getWorkspaceEdit();\n\t\t\t} else {\n\t\t\t\tworkspaceEdit = await self._renameRunnable.runnable.getWorkspaceEdit();\n\t\t\t\tself._renameRunnable = undefined;\n\t\t\t}\n\t\t\tif (workspaceEdit === undefined) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tbulkEditService.apply(workspaceEdit, { reason: source });\n\t\t}));\n\t}\n\n\tpublic async proposeRenameRefactoring(textModel: ITextModel, suggestItem: InlineSuggestionItem): Promise<InlineSuggestionItem> {\n\t\tif (!suggestItem.supportsRename || suggestItem.action?.kind !== 'edit') {\n\t\t\treturn suggestItem;\n\t\t}\n\n\t\tif (!hasProvider(this._languageFeaturesService.renameProvider, textModel)) {\n\t\t\treturn suggestItem;\n\t\t}\n\n\t\tconst start = Date.now();\n\t\tconst edit = suggestItem.action.textReplacement;\n\t\tconst languageConfiguration = this._languageConfigurationService.getLanguageConfiguration(textModel.getLanguageId());\n\n\t\t// Check synchronously if a rename is possible\n\t\tconst edits = this._renameInferenceEngine.inferRename(textModel, edit.range, edit.text, languageConfiguration.wordDefinition);\n\t\tif (edits === undefined || edits.renames.edits.length === 0) {\n\t\t\treturn suggestItem;\n\t\t}\n\n\t\tconst { oldName, newName, position, edits: renameEdits } = edits.renames;\n\n\t\t// Check asynchronously if a rename is possible\n\t\tlet timedOut = false;\n\t\tconst check = await raceTimeout<RenameKind>(this.checkRenamePrecondition(suggestItem, textModel, position, oldName, newName), 100, () => { timedOut = true; });\n\t\tconst renamePossible = check === RenameKind.yes || check === RenameKind.maybe;\n\n\t\tsuggestItem.setRenameProcessingInfo({\n\t\t\tcreatedRename: renamePossible,\n\t\t\tduration: Date.now() - start,\n\t\t\ttimedOut,\n\t\t\tdroppedOtherEdits: renamePossible ? edits.others.edits.length : undefined,\n\t\t\tdroppedRenameEdits: renamePossible ? renameEdits.length - 1 : undefined,\n\t\t});\n\n\t\tif (!renamePossible) {\n\t\t\treturn suggestItem;\n\t\t}\n\n\t\t// Prepare the rename edits\n\t\tconst id = suggestItem.identity.id;\n\t\tif (this._renameRunnable !== undefined) {\n\t\t\tthis._renameRunnable.runnable.cancel();\n\t\t\tthis._renameRunnable = undefined;\n\t\t}\n\t\tconst runnable = new RenameSymbolRunnable(this._languageFeaturesService, textModel, position, newName);\n\t\tthis._renameRunnable = { id, runnable };\n\n\t\t// Create alternative action\n\t\tconst source = EditSources.inlineCompletionAccept({\n\t\t\tnes: suggestItem.isInlineEdit,\n\t\t\trequestUuid: suggestItem.requestUuid,\n\t\t\tproviderId: suggestItem.source.provider.providerId,\n\t\t\tlanguageId: textModel.getLanguageId(),\n\t\t\tcorrelationId: suggestItem.getSourceCompletion().correlationId,\n\t\t});\n\t\tconst command: Command = {\n\t\t\tid: renameSymbolCommandId,\n\t\t\ttitle: localize('rename', \"Rename\"),\n\t\t\targuments: [textModel, position, newName, source, id],\n\t\t};\n\t\tconst alternativeAction: InlineSuggestAlternativeAction = {\n\t\t\tlabel: localize('rename', \"Rename\"),\n\t\t\ticon: Codicon.replaceAll,\n\t\t\tcommand,\n\t\t\tcount: runnable.getCount(),\n\t\t};\n\t\tconst renameAction: IInlineSuggestDataActionEdit = {\n\t\t\tkind: 'edit',\n\t\t\trange: renameEdits[0].range,\n\t\t\tinsertText: renameEdits[0].text,\n\t\t\tsnippetInfo: suggestItem.snippetInfo,\n\t\t\talternativeAction,\n\t\t\turi: textModel.uri\n\t\t};\n\n\t\treturn InlineSuggestionItem.create(suggestItem.withAction(renameAction), textModel, false);\n\t}\n\n\tprivate async checkRenamePrecondition(suggestItem: InlineSuggestionItem, textModel: ITextModel, position: Position, oldName: string, newName: string): Promise<RenameKind> {\n\t\t// const result = await prepareRename(this._languageFeaturesService.renameProvider, textModel, position, CancellationToken.None);\n\t\t// if (result === undefined || result.rejectReason) {\n\t\t// \treturn RenameKind.no;\n\t\t// }\n\t\t// return oldName === result.text ? RenameKind.yes : RenameKind.no;\n\n\t\ttry {\n\t\t\tconst result = await this._commandService.executeCommand<RenameKind>('github.copilot.nes.prepareRename', textModel.uri, position, oldName, newName, suggestItem.requestUuid);\n\t\t\tif (result === undefined) {\n\t\t\t\treturn RenameKind.no;\n\t\t\t} else {\n\t\t\t\treturn RenameKind.fromString(result);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\treturn RenameKind.no;\n\t\t}\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,qDAAqD,CAAC;AAExG,OAAO,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAGzD,OAAO,EAAE,6BAA6B,EAAE,MAAM,+DAA+D,CAAC;AAE9G,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAuB,MAAM,2CAA2C,CAAC;AAC7F,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAGjE,OAAO,EAAE,O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W,CAAC,WAAW;YACpC,iBAAiB;YACjB,GAAG,EAAE,SAAS,CAAC,GAAG;SAClB,CAAC;QAEF,OAAO,oBAAoB,CAAC,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;IAC5F,CAAC;IAEO,KAAK,CAAC,uBAAuB,CAAC,WAAiC,EAAE,SAAqB,EAAE,QAAkB,EAAE,OAAe,EAAE,OAAe;QACnJ,iIAAiI;QACjI,qDAAqD;QACrD,yBAAyB;QACzB,IAAI;QACJ,mEAAmE;QAEnE,IAAI,CAAC;YACJ,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,cAAc,CAAa,kCAAkC,EAAE,SAAS,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;YAC7K,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;gBAC1B,OAAO,UAAU,CAAC,EAAE,CAAC;YACtB,CAAC;iBAAM,CAAC;gBACP,OAAO,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACtC,CAAC;QACF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,OAAO,UAAU,CAAC,EAAE,CAAC;QACtB,CAAC;IACF,CAAC;CACD,CAAA;AAnIY,qBAAqB;IAO/B,WAAA,eAAe,CAAA;IACf,WAAA,wBAAwB,CAAA;IACxB,WAAA,6BAA6B,CAAA;IAC7B,WAAA,gBAAgB,CAAA;GAVN,qBAAqB,CAmIjC","file":"renameSymbolProcessor.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 { raceTimeout } from '../../../../../base/common/async.js';\nimport { CancellationTokenSource } from '../../../../../base/common/cancellation.js';\nimport { LcsDiff, StringDiffSequence } from '../../../../../base/common/diff/diff.js';\nimport { Disposable } from '../../../../../base/common/lifecycle.js';\nimport { localize } from '../../../../../nls.js';\nimport { CommandsRegistry, ICommandService } from '../../../../../platform/commands/common/commands.js';\nimport { ServicesAccessor } from '../../../../browser/editorExtensions.js';\nimport { IBulkEditService } from '../../../../browser/services/bulkEditService.js';\nimport { TextReplacement } from '../../../../common/core/edits/textEdit.js';\nimport { Position } from '../../../../common/core/position.js';\nimport { Range } from '../../../../common/core/range.js';\nimport { StandardTokenType } from '../../../../common/encodedTokenAttributes.js';\nimport { Command, type Rejection, type WorkspaceEdit } from '../../../../common/languages.js';\nimport { ILanguageConfigurationService } from '../../../../common/languages/languageConfigurationRegistry.js';\nimport { ITextModel } from '../../../../common/model.js';\nimport { ILanguageFeaturesService } from '../../../../common/services/languageFeatures.js';\nimport { EditSources, TextModelEditSource } from '../../../../common/textModelEditSource.js';\nimport { hasProvider, rawRename } from '../../../rename/browser/rename.js';\nimport { renameSymbolCommandId } from '../controller/commandIds.js';\nimport { InlineSuggestionItem } from './inlineSuggestionItem.js';\nimport { IInlineSuggestDataActionEdit, InlineCompletionContextWithoutUuid } from './provideInlineCompletions.js';\nimport { InlineSuggestAlternativeAction } from './InlineSuggestAlternativeAction.js';\nimport { Codicon } from '../../../../../base/common/codicons.js';\n\nenum RenameKind {\n\tno = 'no',\n\tyes = 'yes',\n\tmaybe = 'maybe'\n}\n\nnamespace RenameKind {\n\texport function fromString(value: string): RenameKind {\n\t\tswitch (value) {\n\t\t\tcase 'no': return RenameKind.no;\n\t\t\tcase 'yes': return RenameKind.yes;\n\t\t\tcase 'maybe': return RenameKind.maybe;\n\t\t\tdefault: return RenameKind.no;\n\t\t}\n\t}\n}\n\nexport type RenameEdits = {\n\trenames: { edits: TextReplacement[]; position: Position; oldName: string; newName: string };\n\tothers: { edits: TextReplacement[] };\n};\n\nexport class RenameInferenceEngine {\n\n\tpublic constructor() {\n\t}\n\n\tpublic inferRename(textModel: ITextModel, editRange: Range, insertText: string, wordDefinition: RegExp): RenameEdits | undefined {\n\n\t\t// Extend the edit range to full lines to capture prefix/suffix renames\n\t\tconst extendedRange = new Range(editRange.startLineNumber, 1, editRange.endLineNumber, textModel.getLineMaxColumn(editRange.endLineNumber));\n\t\tconst startDiff = editRange.startColumn - extendedRange.startColumn;\n\t\tconst endDiff = extendedRange.endColumn - editRange.endColumn;\n\n\t\tconst originalText = textModel.getValueInRange(extendedRange);\n\t\tconst modifiedText =\n\t\t\ttextModel.getValueInRange(new Range(extendedRange.startLineNumber, extendedRange.startColumn, extendedRange.startLineNumber, extendedRange.startColumn + startDiff)) +\n\t\t\tinsertText +\n\t\t\ttextModel.getValueInRange(new Range(extendedRange.endLineNumber, extendedRange.endColumn - endDiff, extendedRange.endLineNumber, extendedRange.endColumn));\n\n\t\t// console.log(`Original: ${originalText} \\nmodified: ${modifiedText}`);\n\t\tconst others: TextReplacement[] = [];\n\t\tconst renames: TextReplacement[] = [];\n\t\tlet oldName: string | undefined = undefined;\n\t\tlet newName: string | undefined = undefined;\n\t\tlet position: Position | undefined = undefined;\n\n\t\tconst nesOffset = textModel.getOffsetAt(extendedRange.getStartPosition());\n\n\t\tconst { changes: originalChanges } = (new LcsDiff(new StringDiffSequence(originalText), new StringDiffSequence(modifiedText))).ComputeDiff(true);\n\t\tif (originalChanges.length === 0) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Fold the changes to larger changes if the gap between two changes is a full word. This covers cases like renaming\n\t\t// `foo` to `abcfoobar`\n\t\tconst changes: typeof originalChanges = [];\n\t\tfor (const change of originalChanges) {\n\t\t\tif (changes.length === 0) {\n\t\t\t\tchanges.push(change);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst lastChange = changes[changes.length - 1];\n\t\t\tconst gapOriginalLength = change.originalStart - (lastChange.originalStart + lastChange.originalLength);\n\n\t\t\tif (gapOriginalLength > 0) {\n\t\t\t\tconst gapStartOffset = nesOffset + lastChange.originalStart + lastChange.originalLength;\n\t\t\t\tconst gapStartPos = textModel.getPositionAt(gapStartOffset);\n\t\t\t\tconst wordRange = textModel.getWordAtPosition(gapStartPos);\n\n\t\t\t\tif (wordRange) {\n\t\t\t\t\tconst wordStartOffset = textModel.getOffsetAt(new Position(gapStartPos.lineNumber, wordRange.startColumn));\n\t\t\t\t\tconst wordEndOffset = textModel.getOffsetAt(new Position(gapStartPos.lineNumber, wordRange.endColumn));\n\t\t\t\t\tconst gapEndOffset = gapStartOffset + gapOriginalLength;\n\n\t\t\t\t\tif (wordStartOffset <= gapStartOffset && gapEndOffset <= wordEndOffset && wordStartOffset <= gapEndOffset && gapEndOffset <= wordEndOffset) {\n\t\t\t\t\t\tlastChange.originalLength = (change.originalStart + change.originalLength) - lastChange.originalStart;\n\t\t\t\t\t\tlastChange.modifiedLength = (change.modifiedStart + change.modifiedLength) - lastChange.modifiedStart;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tchanges.push(change);\n\t\t}\n\n\t\tlet tokenDiff: number = 0;\n\t\tfor (const change of changes) {\n\t\t\tconst originalTextSegment = originalText.substring(change.originalStart, change.originalStart + change.originalLength);\n\t\t\tconst insertedTextSegment = modifiedText.substring(change.modifiedStart, change.modifiedStart + change.modifiedLength);\n\n\t\t\tconst startOffset = nesOffset + change.originalStart;\n\t\t\tconst startPos = textModel.getPositionAt(startOffset);\n\n\t\t\tconst endOffset = startOffset + change.originalLength;\n\t\t\tconst endPos = textModel.getPositionAt(endOffset);\n\n\t\t\tconst range = Range.fromPositions(startPos, endPos);\n\n\t\t\tconst diff = insertedTextSegment.length - change.originalLength;\n\n\t\t\t// If the original text segment contains a whitespace character we don't consider this a rename since\n\t\t\t// identifiers in programming languages can't contain whitespace characters usually\n\t\t\tif (/\\s/.test(originalTextSegment)) {\n\t\t\t\tothers.push(new TextReplacement(range, insertedTextSegment));\n\t\t\t\ttokenDiff += diff;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (originalTextSegment.length > 0) {\n\t\t\t\twordDefinition.lastIndex = 0;\n\t\t\t\tconst match = wordDefinition.exec(originalTextSegment);\n\t\t\t\tif (match === null || match.index !== 0 || match[0].length !== originalTextSegment.length) {\n\t\t\t\t\tothers.push(new TextReplacement(range, insertedTextSegment));\n\t\t\t\t\ttokenDiff += diff;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If the inserted text contains a whitespace character we don't consider this a rename since identifiers in\n\t\t\t// programming languages can't contain whitespace characters usually\n\t\t\tif (/\\s/.test(insertedTextSegment)) {\n\t\t\t\tothers.push(new TextReplacement(range, insertedTextSegment));\n\t\t\t\ttokenDiff += diff;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (insertedTextSegment.length > 0) {\n\t\t\t\twordDefinition.lastIndex = 0;\n\t\t\t\tconst match = wordDefinition.exec(insertedTextSegment);\n\t\t\t\tif (match === null || match.index !== 0 || match[0].length !== insertedTextSegment.length) {\n\t\t\t\t\tothers.push(new TextReplacement(range, insertedTextSegment));\n\t\t\t\t\ttokenDiff += diff;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst wordRange = textModel.getWordAtPosition(startPos);\n\t\t\t// If we don't have a word range at the start position of the current document then we\n\t\t\t// don't treat it as a rename assuming that the rename refactoring will fail as well since\n\t\t\t// there can't be an identifier at that position.\n\t\t\tif (wordRange === null) {\n\t\t\t\tothers.push(new TextReplacement(range, insertedTextSegment));\n\t\t\t\ttokenDiff += diff;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst originalStartColumn = change.originalStart + 1;\n\t\t\tconst isInsertion = change.originalLength === 0 && change.modifiedLength > 0;\n\t\t\tlet tokenInfo: { type: StandardTokenType; range: Range };\n\t\t\t// Word info is left aligned whereas token info is right aligned for insertions.\n\t\t\t// We prefer a suffix insertion for renames so we take the word range for the token info.\n\t\t\tif (isInsertion && originalStartColumn === wordRange.endColumn && wordRange.endColumn > wordRange.startColumn) {\n\t\t\t\ttokenInfo = this.getTokenAtPosition(textModel, new Position(startPos.lineNumber, wordRange.startColumn));\n\t\t\t} else {\n\t\t\t\ttokenInfo = this.getTokenAtPosition(textModel, startPos);\n\t\t\t}\n\t\t\tif (wordRange.startColumn !== tokenInfo.range.startColumn || wordRange.endColumn !== tokenInfo.range.endColumn) {\n\t\t\t\tothers.push(new TextReplacement(range, insertedTextSegment));\n\t\t\t\ttokenDiff += diff;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (tokenInfo.type === StandardTokenType.Other) {\n\n\t\t\t\tlet identifier = textModel.getValueInRange(tokenInfo.range);\n\t\t\t\tif (identifier.length === 0) {\n\t\t\t\t\tothers.push(new TextReplacement(range, insertedTextSegment));\n\t\t\t\t\ttokenDiff += diff;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (oldName === undefined) {\n\t\t\t\t\toldName = identifier;\n\t\t\t\t} else if (oldName !== identifier) {\n\t\t\t\t\tothers.push(new TextReplacement(range, insertedTextSegment));\n\t\t\t\t\ttokenDiff += diff;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// We assume that the new name starts at the same position as the old name from a token range perspective.\n\t\t\t\tconst tokenStartPos = textModel.getOffsetAt(tokenInfo.range.getStartPosition()) - nesOffset + tokenDiff;\n\t\t\t\tconst tokenEndPos = textModel.getOffsetAt(tokenInfo.range.getEndPosition()) - nesOffset + tokenDiff;\n\t\t\t\tidentifier = modifiedText.substring(tokenStartPos, tokenEndPos + diff);\n\t\t\t\tif (identifier.length === 0) {\n\t\t\t\t\tothers.push(new TextReplacement(range, insertedTextSegment));\n\t\t\t\t\ttokenDiff += diff;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (newName === undefined) {\n\t\t\t\t\tnewName = identifier;\n\t\t\t\t} else if (newName !== identifier) {\n\t\t\t\t\tothers.push(new TextReplacement(range, insertedTextSegment));\n\t\t\t\t\ttokenDiff += diff;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (position === undefined) {\n\t\t\t\t\tposition = tokenInfo.range.getStartPosition();\n\t\t\t\t}\n\n\t\t\t\tif (oldName !== undefined && newName !== undefined && oldName.length > 0 && newName.length > 0 && oldName !== newName) {\n\t\t\t\t\trenames.push(new TextReplacement(tokenInfo.range, newName));\n\t\t\t\t} else {\n\t\t\t\t\trenames.push(new TextReplacement(range, insertedTextSegment));\n\t\t\t\t}\n\t\t\t\ttokenDiff += diff;\n\t\t\t} else {\n\t\t\t\tothers.push(new TextReplacement(range, insertedTextSegment));\n\t\t\t\ttokenDiff += insertedTextSegment.length - change.originalLength;\n\t\t\t}\n\t\t}\n\n\t\tif (oldName === undefined || newName === undefined || position === undefined || oldName.length === 0 || newName.length === 0 || oldName === newName) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\twordDefinition.lastIndex = 0;\n\t\tlet match = wordDefinition.exec(oldName);\n\t\tif (match === null || match.index !== 0 || match[0].length !== oldName.length) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\twordDefinition.lastIndex = 0;\n\t\tmatch = wordDefinition.exec(newName);\n\t\tif (match === null || match.index !== 0 || match[0].length !== newName.length) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn {\n\t\t\trenames: { edits: renames, position, oldName, newName },\n\t\t\tothers: { edits: others }\n\t\t};\n\t}\n\n\n\tprotected getTokenAtPosition(textModel: ITextModel, position: Position): { type: StandardTokenType; range: Range } {\n\t\ttextModel.tokenization.tokenizeIfCheap(position.lineNumber);\n\t\tconst tokens = textModel.tokenization.getLineTokens(position.lineNumber);\n\t\tconst idx = tokens.findTokenIndexAtOffset(position.column - 1);\n\t\treturn {\n\t\t\ttype: tokens.getStandardTokenType(idx),\n\t\t\trange: new Range(position.lineNumber, 1 + tokens.getStartOffset(idx), position.lineNumber, 1 + tokens.getEndOffset(idx))\n\t\t};\n\t}\n}\n\nclass RenameSymbolRunnable {\n\n\tprivate readonly _cancellationTokenSource: CancellationTokenSource;\n\tprivate readonly _promise: Promise<WorkspaceEdit & Rejection>;\n\tprivate _result: WorkspaceEdit & Rejection | undefined = undefined;\n\n\tconstructor(languageFeaturesService: ILanguageFeaturesService, textModel: ITextModel, position: Position, newName: string) {\n\t\tthis._cancellationTokenSource = new CancellationTokenSource();\n\t\tthis._promise = rawRename(languageFeaturesService.renameProvider, textModel, position, newName, this._cancellationTokenSource.token);\n\t}\n\n\tpublic cancel(): void {\n\t\tthis._cancellationTokenSource.cancel();\n\t}\n\n\tpublic async getCount(): Promise<number> {\n\t\tconst result = await this.getResult();\n\t\tif (result === undefined) {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn result.edits.length;\n\t}\n\n\tpublic async getWorkspaceEdit(): Promise<WorkspaceEdit | undefined> {\n\t\treturn this.getResult();\n\t}\n\n\tprivate async getResult(): Promise<WorkspaceEdit | undefined> {\n\t\tif (this._result === undefined) {\n\t\t\tthis._result = await this._promise;\n\t\t}\n\t\tif (this._result.rejectReason) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn this._result;\n\t}\n}\n\nexport class RenameSymbolProcessor extends Disposable {\n\n\tprivate readonly _renameInferenceEngine = new RenameInferenceEngine();\n\n\tprivate _renameRunnable: { id: string; runnable: RenameSymbolRunnable } | undefined;\n\n\tconstructor(\n\t\t@ICommandService private readonly _commandService: ICommandService,\n\t\t@ILanguageFeaturesService private readonly _languageFeaturesService: ILanguageFeaturesService,\n\t\t@ILanguageConfigurationService private readonly _languageConfigurationService: ILanguageConfigurationService,\n\t\t@IBulkEditService bulkEditService: IBulkEditService,\n\t) {\n\t\tsuper();\n\t\tconst self = this;\n\t\tthis._register(CommandsRegistry.registerCommand(renameSymbolCommandId, async (_: ServicesAccessor, textModel: ITextModel, position: Position, newName: string, source: TextModelEditSource, id: string) => {\n\t\t\tif (self._renameRunnable === undefined) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tlet workspaceEdit: WorkspaceEdit | undefined;\n\t\t\tif (self._renameRunnable.id !== id) {\n\t\t\t\tself._renameRunnable.runnable.cancel();\n\t\t\t\tself._renameRunnable = undefined;\n\t\t\t\tconst runnable = new RenameSymbolRunnable(self._languageFeaturesService, textModel, position, newName);\n\t\t\t\tworkspaceEdit = await runnable.getWorkspaceEdit();\n\t\t\t} else {\n\t\t\t\tworkspaceEdit = await self._renameRunnable.runnable.getWorkspaceEdit();\n\t\t\t\tself._renameRunnable = undefined;\n\t\t\t}\n\t\t\tif (workspaceEdit === undefined) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tbulkEditService.apply(workspaceEdit, { reason: source });\n\t\t}));\n\t}\n\n\tpublic async proposeRenameRefactoring(textModel: ITextModel, suggestItem: InlineSuggestionItem, context: InlineCompletionContextWithoutUuid): Promise<InlineSuggestionItem> {\n\t\tif (!suggestItem.supportsRename || suggestItem.action?.kind !== 'edit' || context.selectedSuggestionInfo) {\n\t\t\treturn suggestItem;\n\t\t}\n\n\t\tif (!hasProvider(this._languageFeaturesService.renameProvider, textModel)) {\n\t\t\treturn suggestItem;\n\t\t}\n\n\t\tconst start = Date.now();\n\t\tconst edit = suggestItem.action.textReplacement;\n\t\tconst languageConfiguration = this._languageConfigurationService.getLanguageConfiguration(textModel.getLanguageId());\n\n\t\t// Check synchronously if a rename is possible\n\t\tconst edits = this._renameInferenceEngine.inferRename(textModel, edit.range, edit.text, languageConfiguration.wordDefinition);\n\t\tif (edits === undefined || edits.renames.edits.length === 0) {\n\t\t\treturn suggestItem;\n\t\t}\n\n\t\tconst { oldName, newName, position, edits: renameEdits } = edits.renames;\n\n\t\t// Check asynchronously if a rename is possible\n\t\tlet timedOut = false;\n\t\tconst check = await raceTimeout<RenameKind>(this.checkRenamePrecondition(suggestItem, textModel, position, oldName, newName), 100, () => { timedOut = true; });\n\t\tconst renamePossible = check === RenameKind.yes || check === RenameKind.maybe;\n\n\t\tsuggestItem.setRenameProcessingInfo({\n\t\t\tcreatedRename: renamePossible,\n\t\t\tduration: Date.now() - start,\n\t\t\ttimedOut,\n\t\t\tdroppedOtherEdits: renamePossible ? edits.others.edits.length : undefined,\n\t\t\tdroppedRenameEdits: renamePossible ? renameEdits.length - 1 : undefined,\n\t\t});\n\n\t\tif (!renamePossible) {\n\t\t\treturn suggestItem;\n\t\t}\n\n\t\t// Prepare the rename edits\n\t\tconst id = suggestItem.identity.id;\n\t\tif (this._renameRunnable !== undefined) {\n\t\t\tthis._renameRunnable.runnable.cancel();\n\t\t\tthis._renameRunnable = undefined;\n\t\t}\n\t\tconst runnable = new RenameSymbolRunnable(this._languageFeaturesService, textModel, position, newName);\n\t\tthis._renameRunnable = { id, runnable };\n\n\t\t// Create alternative action\n\t\tconst source = EditSources.inlineCompletionAccept({\n\t\t\tnes: suggestItem.isInlineEdit,\n\t\t\trequestUuid: suggestItem.requestUuid,\n\t\t\tproviderId: suggestItem.source.provider.providerId,\n\t\t\tlanguageId: textModel.getLanguageId(),\n\t\t\tcorrelationId: suggestItem.getSourceCompletion().correlationId,\n\t\t});\n\t\tconst command: Command = {\n\t\t\tid: renameSymbolCommandId,\n\t\t\ttitle: localize('rename', \"Rename\"),\n\t\t\targuments: [textModel, position, newName, source, id],\n\t\t};\n\t\tconst alternativeAction: InlineSuggestAlternativeAction = {\n\t\t\tlabel: localize('rename', \"Rename\"),\n\t\t\ticon: Codicon.replaceAll,\n\t\t\tcommand,\n\t\t\tcount: runnable.getCount(),\n\t\t};\n\t\tconst renameAction: IInlineSuggestDataActionEdit = {\n\t\t\tkind: 'edit',\n\t\t\trange: renameEdits[0].range,\n\t\t\tinsertText: renameEdits[0].text,\n\t\t\tsnippetInfo: suggestItem.snippetInfo,\n\t\t\talternativeAction,\n\t\t\turi: textModel.uri\n\t\t};\n\n\t\treturn InlineSuggestionItem.create(suggestItem.withAction(renameAction), textModel, false);\n\t}\n\n\tprivate async checkRenamePrecondition(suggestItem: InlineSuggestionItem, textModel: ITextModel, position: Position, oldName: string, newName: string): Promise<RenameKind> {\n\t\t// const result = await prepareRename(this._languageFeaturesService.renameProvider, textModel, position, CancellationToken.None);\n\t\t// if (result === undefined || result.rejectReason) {\n\t\t// \treturn RenameKind.no;\n\t\t// }\n\t\t// return oldName === result.text ? RenameKind.yes : RenameKind.no;\n\n\t\ttry {\n\t\t\tconst result = await this._commandService.executeCommand<RenameKind>('github.copilot.nes.prepareRename', textModel.uri, position, oldName, newName, suggestItem.requestUuid);\n\t\t\tif (result === undefined) {\n\t\t\t\treturn RenameKind.no;\n\t\t\t} else {\n\t\t\t\treturn RenameKind.fromString(result);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\treturn RenameKind.no;\n\t\t}\n\t}\n}\n"]}
|
|
@@ -62,13 +62,13 @@ let GutterIndicatorMenuContent = class GutterIndicatorMenuContent {
|
|
|
62
62
|
const title = header(this._data.displayName);
|
|
63
63
|
const gotoAndAccept = option(createOptionArgs({
|
|
64
64
|
id: 'gotoAndAccept',
|
|
65
|
-
title: `${localize(
|
|
65
|
+
title: `${localize(1224, "Go To")} / ${localize(1225, "Accept")}`,
|
|
66
66
|
icon: Codicon.check,
|
|
67
67
|
commandId: inlineSuggestCommitId,
|
|
68
68
|
}));
|
|
69
69
|
const reject = option(createOptionArgs({
|
|
70
70
|
id: 'reject',
|
|
71
|
-
title: localize(
|
|
71
|
+
title: localize(1226, "Reject"),
|
|
72
72
|
icon: Codicon.close,
|
|
73
73
|
commandId: hideInlineCompletionId
|
|
74
74
|
}));
|
|
@@ -100,25 +100,25 @@ let GutterIndicatorMenuContent = class GutterIndicatorMenuContent {
|
|
|
100
100
|
const toggleCollapsedMode = this._inlineEditsShowCollapsed.map(showCollapsed => showCollapsed ?
|
|
101
101
|
option(createOptionArgs({
|
|
102
102
|
id: 'showExpanded',
|
|
103
|
-
title: localize(
|
|
103
|
+
title: localize(1227, "Show Expanded"),
|
|
104
104
|
icon: Codicon.expandAll,
|
|
105
105
|
commandId: toggleShowCollapsedId
|
|
106
106
|
}))
|
|
107
107
|
: option(createOptionArgs({
|
|
108
108
|
id: 'showCollapsed',
|
|
109
|
-
title: localize(
|
|
109
|
+
title: localize(1228, "Show Collapsed"),
|
|
110
110
|
icon: Codicon.collapseAll,
|
|
111
111
|
commandId: toggleShowCollapsedId
|
|
112
112
|
})));
|
|
113
113
|
const snooze = option(createOptionArgs({
|
|
114
114
|
id: 'snooze',
|
|
115
|
-
title: localize(
|
|
115
|
+
title: localize(1229, "Snooze"),
|
|
116
116
|
icon: Codicon.bellSlash,
|
|
117
117
|
commandId: 'editor.action.inlineSuggest.snooze'
|
|
118
118
|
}));
|
|
119
119
|
const settings = option(createOptionArgs({
|
|
120
120
|
id: 'settings',
|
|
121
|
-
title: localize(
|
|
121
|
+
title: localize(1230, "Settings"),
|
|
122
122
|
icon: Codicon.gear,
|
|
123
123
|
commandId: 'workbench.action.openSettings',
|
|
124
124
|
commandArgs: ['@tag:nextEditSuggestions']
|
|
@@ -43,7 +43,7 @@ export class InlineEditsGutterIndicatorData {
|
|
|
43
43
|
export class InlineSuggestionGutterMenuData {
|
|
44
44
|
static fromInlineSuggestion(suggestion) {
|
|
45
45
|
const alternativeAction = suggestion.action?.kind === 'edit' ? suggestion.action.alternativeAction : undefined;
|
|
46
|
-
return new InlineSuggestionGutterMenuData(suggestion.gutterMenuLinkAction, suggestion.source.provider.displayName ?? localize(
|
|
46
|
+
return new InlineSuggestionGutterMenuData(suggestion.gutterMenuLinkAction, suggestion.source.provider.displayName ?? localize(1231, "Inline Suggestion"), suggestion.source.inlineSuggestions.commands ?? [], alternativeAction, suggestion.source.provider.modelInfo, suggestion.source.provider.setModelId?.bind(suggestion.source.provider));
|
|
47
47
|
}
|
|
48
48
|
constructor(action, displayName, extensionCommands, alternativeAction, modelInfo, setModelId) {
|
|
49
49
|
this.action = action;
|
|
@@ -108,10 +108,10 @@ let InlineEditsWordReplacementView = class InlineEditsWordReplacementView extend
|
|
|
108
108
|
const count = altCount.read(reader);
|
|
109
109
|
const active = altModifierActive.read(reader);
|
|
110
110
|
const occurrencesLabel = count !== undefined ? count === 1 ?
|
|
111
|
-
localize(
|
|
112
|
-
localize(
|
|
111
|
+
localize(1232, "{0} 1 occurrence", label) :
|
|
112
|
+
localize(1233, "{0} {1} occurrences", label, count)
|
|
113
113
|
: label;
|
|
114
|
-
const keybindingTooltip = localize(
|
|
114
|
+
const keybindingTooltip = localize(1234, "{0} show occurrences", '[shift]');
|
|
115
115
|
alternativeAction = {
|
|
116
116
|
label: count !== undefined ? (active ? occurrencesLabel : label) : label,
|
|
117
117
|
tooltip: occurrencesLabel ? `${occurrencesLabel}\n${keybindingTooltip}` : undefined,
|
|
@@ -8,63 +8,63 @@ import { localize } from '../../../../../../nls.js';
|
|
|
8
8
|
import { buttonBackground, buttonForeground, buttonSecondaryBackground, buttonSecondaryForeground, diffInserted, diffInsertedLine, diffRemoved, editorBackground } from '../../../../../../platform/theme/common/colorRegistry.js';
|
|
9
9
|
import { darken, registerColor, transparent } from '../../../../../../platform/theme/common/colorUtils.js';
|
|
10
10
|
import { InlineEditTabAction } from './inlineEditsViewInterface.js';
|
|
11
|
-
export const originalBackgroundColor = registerColor('inlineEdit.originalBackground', transparent(diffRemoved, 0.2), localize(
|
|
12
|
-
export const modifiedBackgroundColor = registerColor('inlineEdit.modifiedBackground', transparent(diffInserted, 0.3), localize(
|
|
13
|
-
export const originalChangedLineBackgroundColor = registerColor('inlineEdit.originalChangedLineBackground', transparent(diffRemoved, 0.8), localize(
|
|
14
|
-
export const originalChangedTextOverlayColor = registerColor('inlineEdit.originalChangedTextBackground', transparent(diffRemoved, 0.8), localize(
|
|
11
|
+
export const originalBackgroundColor = registerColor('inlineEdit.originalBackground', transparent(diffRemoved, 0.2), localize(1235, 'Background color for the original text in inline edits.'), true);
|
|
12
|
+
export const modifiedBackgroundColor = registerColor('inlineEdit.modifiedBackground', transparent(diffInserted, 0.3), localize(1236, 'Background color for the modified text in inline edits.'), true);
|
|
13
|
+
export const originalChangedLineBackgroundColor = registerColor('inlineEdit.originalChangedLineBackground', transparent(diffRemoved, 0.8), localize(1237, 'Background color for the changed lines in the original text of inline edits.'), true);
|
|
14
|
+
export const originalChangedTextOverlayColor = registerColor('inlineEdit.originalChangedTextBackground', transparent(diffRemoved, 0.8), localize(1238, 'Overlay color for the changed text in the original text of inline edits.'), true);
|
|
15
15
|
export const modifiedChangedLineBackgroundColor = registerColor('inlineEdit.modifiedChangedLineBackground', {
|
|
16
16
|
light: transparent(diffInsertedLine, 0.7),
|
|
17
17
|
dark: transparent(diffInsertedLine, 0.7),
|
|
18
18
|
hcDark: diffInsertedLine,
|
|
19
19
|
hcLight: diffInsertedLine
|
|
20
|
-
}, localize(
|
|
21
|
-
export const modifiedChangedTextOverlayColor = registerColor('inlineEdit.modifiedChangedTextBackground', transparent(diffInserted, 0.7), localize(
|
|
20
|
+
}, localize(1239, 'Background color for the changed lines in the modified text of inline edits.'), true);
|
|
21
|
+
export const modifiedChangedTextOverlayColor = registerColor('inlineEdit.modifiedChangedTextBackground', transparent(diffInserted, 0.7), localize(1240, 'Overlay color for the changed text in the modified text of inline edits.'), true);
|
|
22
22
|
// ------- GUTTER INDICATOR -------
|
|
23
|
-
export const inlineEditIndicatorPrimaryForeground = registerColor('inlineEdit.gutterIndicator.primaryForeground', buttonForeground, localize(
|
|
24
|
-
export const inlineEditIndicatorPrimaryBorder = registerColor('inlineEdit.gutterIndicator.primaryBorder', buttonBackground, localize(
|
|
23
|
+
export const inlineEditIndicatorPrimaryForeground = registerColor('inlineEdit.gutterIndicator.primaryForeground', buttonForeground, localize(1241, 'Foreground color for the primary inline edit gutter indicator.'));
|
|
24
|
+
export const inlineEditIndicatorPrimaryBorder = registerColor('inlineEdit.gutterIndicator.primaryBorder', buttonBackground, localize(1242, 'Border color for the primary inline edit gutter indicator.'));
|
|
25
25
|
export const inlineEditIndicatorPrimaryBackground = registerColor('inlineEdit.gutterIndicator.primaryBackground', {
|
|
26
26
|
light: transparent(inlineEditIndicatorPrimaryBorder, 0.5),
|
|
27
27
|
dark: transparent(inlineEditIndicatorPrimaryBorder, 0.4),
|
|
28
28
|
hcDark: transparent(inlineEditIndicatorPrimaryBorder, 0.4),
|
|
29
29
|
hcLight: transparent(inlineEditIndicatorPrimaryBorder, 0.5),
|
|
30
|
-
}, localize(
|
|
31
|
-
export const inlineEditIndicatorSecondaryForeground = registerColor('inlineEdit.gutterIndicator.secondaryForeground', buttonSecondaryForeground, localize(
|
|
32
|
-
export const inlineEditIndicatorSecondaryBorder = registerColor('inlineEdit.gutterIndicator.secondaryBorder', buttonSecondaryBackground, localize(
|
|
33
|
-
export const inlineEditIndicatorSecondaryBackground = registerColor('inlineEdit.gutterIndicator.secondaryBackground', inlineEditIndicatorSecondaryBorder, localize(
|
|
34
|
-
export const inlineEditIndicatorSuccessfulForeground = registerColor('inlineEdit.gutterIndicator.successfulForeground', buttonForeground, localize(
|
|
35
|
-
export const inlineEditIndicatorSuccessfulBorder = registerColor('inlineEdit.gutterIndicator.successfulBorder', buttonBackground, localize(
|
|
36
|
-
export const inlineEditIndicatorSuccessfulBackground = registerColor('inlineEdit.gutterIndicator.successfulBackground', inlineEditIndicatorSuccessfulBorder, localize(
|
|
30
|
+
}, localize(1243, 'Background color for the primary inline edit gutter indicator.'));
|
|
31
|
+
export const inlineEditIndicatorSecondaryForeground = registerColor('inlineEdit.gutterIndicator.secondaryForeground', buttonSecondaryForeground, localize(1244, 'Foreground color for the secondary inline edit gutter indicator.'));
|
|
32
|
+
export const inlineEditIndicatorSecondaryBorder = registerColor('inlineEdit.gutterIndicator.secondaryBorder', buttonSecondaryBackground, localize(1245, 'Border color for the secondary inline edit gutter indicator.'));
|
|
33
|
+
export const inlineEditIndicatorSecondaryBackground = registerColor('inlineEdit.gutterIndicator.secondaryBackground', inlineEditIndicatorSecondaryBorder, localize(1246, 'Background color for the secondary inline edit gutter indicator.'));
|
|
34
|
+
export const inlineEditIndicatorSuccessfulForeground = registerColor('inlineEdit.gutterIndicator.successfulForeground', buttonForeground, localize(1247, 'Foreground color for the successful inline edit gutter indicator.'));
|
|
35
|
+
export const inlineEditIndicatorSuccessfulBorder = registerColor('inlineEdit.gutterIndicator.successfulBorder', buttonBackground, localize(1248, 'Border color for the successful inline edit gutter indicator.'));
|
|
36
|
+
export const inlineEditIndicatorSuccessfulBackground = registerColor('inlineEdit.gutterIndicator.successfulBackground', inlineEditIndicatorSuccessfulBorder, localize(1249, 'Background color for the successful inline edit gutter indicator.'));
|
|
37
37
|
export const inlineEditIndicatorBackground = registerColor('inlineEdit.gutterIndicator.background', {
|
|
38
38
|
hcDark: transparent('tab.inactiveBackground', 0.5),
|
|
39
39
|
hcLight: transparent('tab.inactiveBackground', 0.5),
|
|
40
40
|
dark: transparent('tab.inactiveBackground', 0.5),
|
|
41
41
|
light: '#5f5f5f18',
|
|
42
|
-
}, localize(
|
|
42
|
+
}, localize(1250, 'Background color for the inline edit gutter indicator.'));
|
|
43
43
|
// ------- BORDER COLORS -------
|
|
44
44
|
const originalBorder = registerColor('inlineEdit.originalBorder', {
|
|
45
45
|
light: diffRemoved,
|
|
46
46
|
dark: diffRemoved,
|
|
47
47
|
hcDark: diffRemoved,
|
|
48
48
|
hcLight: diffRemoved
|
|
49
|
-
}, localize(
|
|
49
|
+
}, localize(1251, 'Border color for the original text in inline edits.'));
|
|
50
50
|
const modifiedBorder = registerColor('inlineEdit.modifiedBorder', {
|
|
51
51
|
light: darken(diffInserted, 0.6),
|
|
52
52
|
dark: diffInserted,
|
|
53
53
|
hcDark: diffInserted,
|
|
54
54
|
hcLight: diffInserted
|
|
55
|
-
}, localize(
|
|
55
|
+
}, localize(1252, 'Border color for the modified text in inline edits.'));
|
|
56
56
|
const tabWillAcceptModifiedBorder = registerColor('inlineEdit.tabWillAcceptModifiedBorder', {
|
|
57
57
|
light: darken(modifiedBorder, 0),
|
|
58
58
|
dark: darken(modifiedBorder, 0),
|
|
59
59
|
hcDark: darken(modifiedBorder, 0),
|
|
60
60
|
hcLight: darken(modifiedBorder, 0)
|
|
61
|
-
}, localize(
|
|
61
|
+
}, localize(1253, 'Modified border color for the inline edits widget when tab will accept it.'));
|
|
62
62
|
const tabWillAcceptOriginalBorder = registerColor('inlineEdit.tabWillAcceptOriginalBorder', {
|
|
63
63
|
light: darken(originalBorder, 0),
|
|
64
64
|
dark: darken(originalBorder, 0),
|
|
65
65
|
hcDark: darken(originalBorder, 0),
|
|
66
66
|
hcLight: darken(originalBorder, 0)
|
|
67
|
-
}, localize(
|
|
67
|
+
}, localize(1254, 'Original border color for the inline edits widget over the original text when tab will accept it.'));
|
|
68
68
|
export function getModifiedBorderColor(tabAction) {
|
|
69
69
|
return tabAction.map(a => a === InlineEditTabAction.Accept ? tabWillAcceptModifiedBorder : modifiedBorder);
|
|
70
70
|
}
|
|
@@ -11,7 +11,7 @@ export class InsertFinalNewLineAction extends EditorAction {
|
|
|
11
11
|
constructor() {
|
|
12
12
|
super({
|
|
13
13
|
id: InsertFinalNewLineAction.ID,
|
|
14
|
-
label: nls.localize2(
|
|
14
|
+
label: nls.localize2(1257, "Insert Final New Line"),
|
|
15
15
|
precondition: EditorContextKeys.writable
|
|
16
16
|
});
|
|
17
17
|
}
|
|
@@ -10,7 +10,7 @@ export class ExpandLineSelectionAction extends EditorAction {
|
|
|
10
10
|
constructor() {
|
|
11
11
|
super({
|
|
12
12
|
id: 'expandLineSelection',
|
|
13
|
-
label: nls.localize2(
|
|
13
|
+
label: nls.localize2(1258, "Expand Line Selection"),
|
|
14
14
|
precondition: undefined,
|
|
15
15
|
kbOpts: {
|
|
16
16
|
weight: 0 /* KeybindingWeight.EditorCore */,
|
|
@@ -63,7 +63,7 @@ class CopyLinesUpAction extends AbstractCopyLinesAction {
|
|
|
63
63
|
constructor() {
|
|
64
64
|
super(false, {
|
|
65
65
|
id: 'editor.action.copyLinesUpAction',
|
|
66
|
-
label: nls.localize2(
|
|
66
|
+
label: nls.localize2(1264, "Copy Line Up"),
|
|
67
67
|
precondition: EditorContextKeys.writable,
|
|
68
68
|
kbOpts: {
|
|
69
69
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -74,7 +74,7 @@ class CopyLinesUpAction extends AbstractCopyLinesAction {
|
|
|
74
74
|
menuOpts: {
|
|
75
75
|
menuId: MenuId.MenubarSelectionMenu,
|
|
76
76
|
group: '2_line',
|
|
77
|
-
title: nls.localize(
|
|
77
|
+
title: nls.localize(1259, "&&Copy Line Up"),
|
|
78
78
|
order: 1
|
|
79
79
|
},
|
|
80
80
|
canTriggerInlineEdits: true,
|
|
@@ -85,7 +85,7 @@ class CopyLinesDownAction extends AbstractCopyLinesAction {
|
|
|
85
85
|
constructor() {
|
|
86
86
|
super(true, {
|
|
87
87
|
id: 'editor.action.copyLinesDownAction',
|
|
88
|
-
label: nls.localize2(
|
|
88
|
+
label: nls.localize2(1265, "Copy Line Down"),
|
|
89
89
|
precondition: EditorContextKeys.writable,
|
|
90
90
|
kbOpts: {
|
|
91
91
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -96,7 +96,7 @@ class CopyLinesDownAction extends AbstractCopyLinesAction {
|
|
|
96
96
|
menuOpts: {
|
|
97
97
|
menuId: MenuId.MenubarSelectionMenu,
|
|
98
98
|
group: '2_line',
|
|
99
|
-
title: nls.localize(
|
|
99
|
+
title: nls.localize(1260, "Co&&py Line Down"),
|
|
100
100
|
order: 2
|
|
101
101
|
},
|
|
102
102
|
canTriggerInlineEdits: true,
|
|
@@ -107,12 +107,12 @@ export class DuplicateSelectionAction extends EditorAction {
|
|
|
107
107
|
constructor() {
|
|
108
108
|
super({
|
|
109
109
|
id: 'editor.action.duplicateSelection',
|
|
110
|
-
label: nls.localize2(
|
|
110
|
+
label: nls.localize2(1266, "Duplicate Selection"),
|
|
111
111
|
precondition: EditorContextKeys.writable,
|
|
112
112
|
menuOpts: {
|
|
113
113
|
menuId: MenuId.MenubarSelectionMenu,
|
|
114
114
|
group: '2_line',
|
|
115
|
-
title: nls.localize(
|
|
115
|
+
title: nls.localize(1261, "&&Duplicate Selection"),
|
|
116
116
|
order: 5
|
|
117
117
|
},
|
|
118
118
|
canTriggerInlineEdits: true,
|
|
@@ -162,7 +162,7 @@ class MoveLinesUpAction extends AbstractMoveLinesAction {
|
|
|
162
162
|
constructor() {
|
|
163
163
|
super(false, {
|
|
164
164
|
id: 'editor.action.moveLinesUpAction',
|
|
165
|
-
label: nls.localize2(
|
|
165
|
+
label: nls.localize2(1267, "Move Line Up"),
|
|
166
166
|
precondition: EditorContextKeys.writable,
|
|
167
167
|
kbOpts: {
|
|
168
168
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -173,7 +173,7 @@ class MoveLinesUpAction extends AbstractMoveLinesAction {
|
|
|
173
173
|
menuOpts: {
|
|
174
174
|
menuId: MenuId.MenubarSelectionMenu,
|
|
175
175
|
group: '2_line',
|
|
176
|
-
title: nls.localize(
|
|
176
|
+
title: nls.localize(1262, "Mo&&ve Line Up"),
|
|
177
177
|
order: 3
|
|
178
178
|
},
|
|
179
179
|
canTriggerInlineEdits: true,
|
|
@@ -184,7 +184,7 @@ class MoveLinesDownAction extends AbstractMoveLinesAction {
|
|
|
184
184
|
constructor() {
|
|
185
185
|
super(true, {
|
|
186
186
|
id: 'editor.action.moveLinesDownAction',
|
|
187
|
-
label: nls.localize2(
|
|
187
|
+
label: nls.localize2(1268, "Move Line Down"),
|
|
188
188
|
precondition: EditorContextKeys.writable,
|
|
189
189
|
kbOpts: {
|
|
190
190
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -195,7 +195,7 @@ class MoveLinesDownAction extends AbstractMoveLinesAction {
|
|
|
195
195
|
menuOpts: {
|
|
196
196
|
menuId: MenuId.MenubarSelectionMenu,
|
|
197
197
|
group: '2_line',
|
|
198
|
-
title: nls.localize(
|
|
198
|
+
title: nls.localize(1263, "Move &&Line Down"),
|
|
199
199
|
order: 4
|
|
200
200
|
},
|
|
201
201
|
canTriggerInlineEdits: true,
|
|
@@ -235,7 +235,7 @@ export class SortLinesAscendingAction extends AbstractSortLinesAction {
|
|
|
235
235
|
constructor() {
|
|
236
236
|
super(false, {
|
|
237
237
|
id: 'editor.action.sortLinesAscending',
|
|
238
|
-
label: nls.localize2(
|
|
238
|
+
label: nls.localize2(1269, "Sort Lines Ascending"),
|
|
239
239
|
precondition: EditorContextKeys.writable,
|
|
240
240
|
canTriggerInlineEdits: true,
|
|
241
241
|
});
|
|
@@ -245,7 +245,7 @@ export class SortLinesDescendingAction extends AbstractSortLinesAction {
|
|
|
245
245
|
constructor() {
|
|
246
246
|
super(true, {
|
|
247
247
|
id: 'editor.action.sortLinesDescending',
|
|
248
|
-
label: nls.localize2(
|
|
248
|
+
label: nls.localize2(1270, "Sort Lines Descending"),
|
|
249
249
|
precondition: EditorContextKeys.writable,
|
|
250
250
|
canTriggerInlineEdits: true,
|
|
251
251
|
});
|
|
@@ -255,7 +255,7 @@ export class DeleteDuplicateLinesAction extends EditorAction {
|
|
|
255
255
|
constructor() {
|
|
256
256
|
super({
|
|
257
257
|
id: 'editor.action.removeDuplicateLines',
|
|
258
|
-
label: nls.localize2(
|
|
258
|
+
label: nls.localize2(1271, "Delete Duplicate Lines"),
|
|
259
259
|
precondition: EditorContextKeys.writable,
|
|
260
260
|
canTriggerInlineEdits: true,
|
|
261
261
|
});
|
|
@@ -305,7 +305,7 @@ export class ReverseLinesAction extends EditorAction {
|
|
|
305
305
|
constructor() {
|
|
306
306
|
super({
|
|
307
307
|
id: 'editor.action.reverseLines',
|
|
308
|
-
label: nls.localize2(
|
|
308
|
+
label: nls.localize2(1272, "Reverse lines"),
|
|
309
309
|
precondition: EditorContextKeys.writable,
|
|
310
310
|
canTriggerInlineEdits: true
|
|
311
311
|
});
|
|
@@ -372,7 +372,7 @@ export class TrimTrailingWhitespaceAction extends EditorAction {
|
|
|
372
372
|
constructor() {
|
|
373
373
|
super({
|
|
374
374
|
id: TrimTrailingWhitespaceAction.ID,
|
|
375
|
-
label: nls.localize2(
|
|
375
|
+
label: nls.localize2(1273, "Trim Trailing Whitespace"),
|
|
376
376
|
precondition: EditorContextKeys.writable,
|
|
377
377
|
kbOpts: {
|
|
378
378
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -406,7 +406,7 @@ export class DeleteLinesAction extends EditorAction {
|
|
|
406
406
|
constructor() {
|
|
407
407
|
super({
|
|
408
408
|
id: 'editor.action.deleteLines',
|
|
409
|
-
label: nls.localize2(
|
|
409
|
+
label: nls.localize2(1274, "Delete Line"),
|
|
410
410
|
precondition: EditorContextKeys.writable,
|
|
411
411
|
kbOpts: {
|
|
412
412
|
kbExpr: EditorContextKeys.textInputFocus,
|
|
@@ -496,7 +496,7 @@ export class IndentLinesAction extends EditorAction {
|
|
|
496
496
|
constructor() {
|
|
497
497
|
super({
|
|
498
498
|
id: 'editor.action.indentLines',
|
|
499
|
-
label: nls.localize2(
|
|
499
|
+
label: nls.localize2(1275, "Indent Line"),
|
|
500
500
|
precondition: EditorContextKeys.writable,
|
|
501
501
|
kbOpts: {
|
|
502
502
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -520,7 +520,7 @@ class OutdentLinesAction extends EditorAction {
|
|
|
520
520
|
constructor() {
|
|
521
521
|
super({
|
|
522
522
|
id: 'editor.action.outdentLines',
|
|
523
|
-
label: nls.localize2(
|
|
523
|
+
label: nls.localize2(1276, "Outdent Line"),
|
|
524
524
|
precondition: EditorContextKeys.writable,
|
|
525
525
|
kbOpts: {
|
|
526
526
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -539,7 +539,7 @@ export class InsertLineBeforeAction extends EditorAction {
|
|
|
539
539
|
constructor() {
|
|
540
540
|
super({
|
|
541
541
|
id: InsertLineBeforeAction.ID,
|
|
542
|
-
label: nls.localize2(
|
|
542
|
+
label: nls.localize2(1277, "Insert Line Above"),
|
|
543
543
|
precondition: EditorContextKeys.writable,
|
|
544
544
|
kbOpts: {
|
|
545
545
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -563,7 +563,7 @@ export class InsertLineAfterAction extends EditorAction {
|
|
|
563
563
|
constructor() {
|
|
564
564
|
super({
|
|
565
565
|
id: InsertLineAfterAction.ID,
|
|
566
|
-
label: nls.localize2(
|
|
566
|
+
label: nls.localize2(1278, "Insert Line Below"),
|
|
567
567
|
precondition: EditorContextKeys.writable,
|
|
568
568
|
kbOpts: {
|
|
569
569
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -615,7 +615,7 @@ export class DeleteAllLeftAction extends AbstractDeleteAllToBoundaryAction {
|
|
|
615
615
|
constructor() {
|
|
616
616
|
super({
|
|
617
617
|
id: 'deleteAllLeft',
|
|
618
|
-
label: nls.localize2(
|
|
618
|
+
label: nls.localize2(1279, "Delete All Left"),
|
|
619
619
|
precondition: EditorContextKeys.writable,
|
|
620
620
|
kbOpts: {
|
|
621
621
|
kbExpr: EditorContextKeys.textInputFocus,
|
|
@@ -685,7 +685,7 @@ export class DeleteAllRightAction extends AbstractDeleteAllToBoundaryAction {
|
|
|
685
685
|
constructor() {
|
|
686
686
|
super({
|
|
687
687
|
id: 'deleteAllRight',
|
|
688
|
-
label: nls.localize2(
|
|
688
|
+
label: nls.localize2(1280, "Delete All Right"),
|
|
689
689
|
precondition: EditorContextKeys.writable,
|
|
690
690
|
kbOpts: {
|
|
691
691
|
kbExpr: EditorContextKeys.textInputFocus,
|
|
@@ -743,7 +743,7 @@ export class JoinLinesAction extends EditorAction {
|
|
|
743
743
|
constructor() {
|
|
744
744
|
super({
|
|
745
745
|
id: 'editor.action.joinLines',
|
|
746
|
-
label: nls.localize2(
|
|
746
|
+
label: nls.localize2(1281, "Join Lines"),
|
|
747
747
|
precondition: EditorContextKeys.writable,
|
|
748
748
|
kbOpts: {
|
|
749
749
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -885,7 +885,7 @@ export class TransposeAction extends EditorAction {
|
|
|
885
885
|
constructor() {
|
|
886
886
|
super({
|
|
887
887
|
id: 'editor.action.transpose',
|
|
888
|
-
label: nls.localize2(
|
|
888
|
+
label: nls.localize2(1282, "Transpose Characters around the Cursor"),
|
|
889
889
|
precondition: EditorContextKeys.writable,
|
|
890
890
|
canTriggerInlineEdits: true,
|
|
891
891
|
});
|
|
@@ -965,7 +965,7 @@ export class UpperCaseAction extends AbstractCaseAction {
|
|
|
965
965
|
constructor() {
|
|
966
966
|
super({
|
|
967
967
|
id: 'editor.action.transformToUppercase',
|
|
968
|
-
label: nls.localize2(
|
|
968
|
+
label: nls.localize2(1283, "Transform to Uppercase"),
|
|
969
969
|
precondition: EditorContextKeys.writable,
|
|
970
970
|
canTriggerInlineEdits: true,
|
|
971
971
|
});
|
|
@@ -978,7 +978,7 @@ export class LowerCaseAction extends AbstractCaseAction {
|
|
|
978
978
|
constructor() {
|
|
979
979
|
super({
|
|
980
980
|
id: 'editor.action.transformToLowercase',
|
|
981
|
-
label: nls.localize2(
|
|
981
|
+
label: nls.localize2(1284, "Transform to Lowercase"),
|
|
982
982
|
precondition: EditorContextKeys.writable,
|
|
983
983
|
canTriggerInlineEdits: true
|
|
984
984
|
});
|
|
@@ -1015,7 +1015,7 @@ export class TitleCaseAction extends AbstractCaseAction {
|
|
|
1015
1015
|
constructor() {
|
|
1016
1016
|
super({
|
|
1017
1017
|
id: 'editor.action.transformToTitlecase',
|
|
1018
|
-
label: nls.localize2(
|
|
1018
|
+
label: nls.localize2(1285, "Transform to Title Case"),
|
|
1019
1019
|
precondition: EditorContextKeys.writable,
|
|
1020
1020
|
canTriggerInlineEdits: true
|
|
1021
1021
|
});
|
|
@@ -1037,7 +1037,7 @@ export class SnakeCaseAction extends AbstractCaseAction {
|
|
|
1037
1037
|
constructor() {
|
|
1038
1038
|
super({
|
|
1039
1039
|
id: 'editor.action.transformToSnakecase',
|
|
1040
|
-
label: nls.localize2(
|
|
1040
|
+
label: nls.localize2(1286, "Transform to Snake Case"),
|
|
1041
1041
|
precondition: EditorContextKeys.writable,
|
|
1042
1042
|
canTriggerInlineEdits: true,
|
|
1043
1043
|
});
|
|
@@ -1062,7 +1062,7 @@ export class CamelCaseAction extends AbstractCaseAction {
|
|
|
1062
1062
|
constructor() {
|
|
1063
1063
|
super({
|
|
1064
1064
|
id: 'editor.action.transformToCamelcase',
|
|
1065
|
-
label: nls.localize2(
|
|
1065
|
+
label: nls.localize2(1287, "Transform to Camel Case"),
|
|
1066
1066
|
precondition: EditorContextKeys.writable,
|
|
1067
1067
|
canTriggerInlineEdits: true
|
|
1068
1068
|
});
|
|
@@ -1087,7 +1087,7 @@ export class PascalCaseAction extends AbstractCaseAction {
|
|
|
1087
1087
|
constructor() {
|
|
1088
1088
|
super({
|
|
1089
1089
|
id: 'editor.action.transformToPascalcase',
|
|
1090
|
-
label: nls.localize2(
|
|
1090
|
+
label: nls.localize2(1288, "Transform to Pascal Case"),
|
|
1091
1091
|
precondition: EditorContextKeys.writable,
|
|
1092
1092
|
canTriggerInlineEdits: true,
|
|
1093
1093
|
});
|
|
@@ -1127,7 +1127,7 @@ export class KebabCaseAction extends AbstractCaseAction {
|
|
|
1127
1127
|
constructor() {
|
|
1128
1128
|
super({
|
|
1129
1129
|
id: 'editor.action.transformToKebabcase',
|
|
1130
|
-
label: nls.localize2(
|
|
1130
|
+
label: nls.localize2(1289, 'Transform to Kebab Case'),
|
|
1131
1131
|
precondition: EditorContextKeys.writable,
|
|
1132
1132
|
canTriggerInlineEdits: true,
|
|
1133
1133
|
});
|