monaco-editor-core 0.56.0-dev-20251124 → 0.56.0-dev-20251217
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 +34 -2
- package/esm/vs/base/browser/dom.js +1 -4
- package/esm/vs/base/browser/dom.js.map +1 -1
- package/esm/vs/base/browser/markdownRenderer.js +25 -11
- package/esm/vs/base/browser/markdownRenderer.js.map +1 -1
- package/esm/vs/base/browser/ui/button/button.js +15 -8
- package/esm/vs/base/browser/ui/button/button.js.map +1 -1
- package/esm/vs/base/browser/ui/codicons/codicon/codicon-modifiers.css +3 -8
- package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/esm/vs/base/browser/ui/list/list.css +1 -0
- package/esm/vs/base/browser/ui/toolbar/toolbar.js +3 -0
- package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
- package/esm/vs/base/common/async.js +11 -0
- package/esm/vs/base/common/async.js.map +1 -1
- package/esm/vs/base/common/codiconsLibrary.js +11 -2
- package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
- package/esm/vs/base/common/defaultAccount.js +6 -0
- package/esm/vs/base/common/defaultAccount.js.map +1 -0
- package/esm/vs/base/common/equals.js +73 -24
- package/esm/vs/base/common/equals.js.map +1 -1
- package/esm/vs/base/common/event.js +14 -4
- package/esm/vs/base/common/event.js.map +1 -1
- package/esm/vs/base/common/iterator.js.map +1 -1
- package/esm/vs/base/common/keybindings.js +0 -8
- package/esm/vs/base/common/keybindings.js.map +1 -1
- package/esm/vs/base/common/lifecycle.js +2 -2
- package/esm/vs/base/common/lifecycle.js.map +1 -1
- package/esm/vs/base/common/marshallingIds.js.map +1 -1
- package/esm/vs/base/common/observableInternal/index.js +1 -1
- package/esm/vs/base/common/observableInternal/index.js.map +1 -1
- package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js +1 -1
- package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js.map +1 -1
- package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js +16 -0
- package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js.map +1 -1
- package/esm/vs/base/common/observableInternal/utils/utils.js +11 -0
- package/esm/vs/base/common/observableInternal/utils/utils.js.map +1 -1
- package/esm/vs/base/common/product.js.map +1 -1
- package/esm/vs/base/common/strings.js +3 -1
- package/esm/vs/base/common/strings.js.map +1 -1
- package/esm/vs/editor/browser/controller/dragScrolling.js +2 -1
- package/esm/vs/editor/browser/controller/dragScrolling.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js +73 -2
- package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +7 -51
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/screenReaderUtils.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js +7 -20
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.js +14 -44
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextRegistry.js +19 -0
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextRegistry.js.map +1 -0
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextState.js +14 -1
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextState.js.map +1 -1
- package/esm/vs/editor/browser/controller/mouseHandler.js +5 -2
- package/esm/vs/editor/browser/controller/mouseHandler.js.map +1 -1
- package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
- package/esm/vs/editor/browser/observableCodeEditor.js +32 -15
- package/esm/vs/editor/browser/observableCodeEditor.js.map +1 -1
- package/esm/vs/editor/browser/view.js +11 -2
- package/esm/vs/editor/browser/view.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +5 -2
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +10 -0
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
- package/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js.map +1 -1
- package/esm/vs/editor/browser/widget/multiDiffEditor/style.css +48 -0
- package/esm/vs/editor/common/config/fontInfo.js +1 -1
- package/esm/vs/editor/common/config/fontInfo.js.map +1 -1
- package/esm/vs/editor/common/core/edits/edit.js +19 -0
- package/esm/vs/editor/common/core/edits/edit.js.map +1 -1
- package/esm/vs/editor/common/core/edits/stringEdit.js +13 -0
- package/esm/vs/editor/common/core/edits/stringEdit.js.map +1 -1
- package/esm/vs/editor/common/core/edits/textEdit.js.map +1 -1
- package/esm/vs/editor/common/core/text/positionToOffsetImpl.js +24 -10
- package/esm/vs/editor/common/core/text/positionToOffsetImpl.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursorMoveCommands.js +4 -4
- package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursorWordOperations.js +6 -3
- package/esm/vs/editor/common/cursor/cursorWordOperations.js.map +1 -1
- package/esm/vs/editor/common/languages/defaultDocumentColorsComputer.js +2 -2
- package/esm/vs/editor/common/languages/defaultDocumentColorsComputer.js.map +1 -1
- package/esm/vs/editor/common/languages/nullTokenize.js +1 -1
- package/esm/vs/editor/common/languages/nullTokenize.js.map +1 -1
- package/esm/vs/editor/common/languages/supports/tokenization.js +3 -0
- package/esm/vs/editor/common/languages/supports/tokenization.js.map +1 -1
- package/esm/vs/editor/common/languages.js +2 -1
- package/esm/vs/editor/common/languages.js.map +1 -1
- package/esm/vs/editor/common/model/decorationProvider.js +21 -1
- package/esm/vs/editor/common/model/decorationProvider.js.map +1 -1
- package/esm/vs/editor/common/model/textModel.js +49 -30
- package/esm/vs/editor/common/model/textModel.js.map +1 -1
- package/esm/vs/editor/common/model/tokens/abstractSyntaxTokenBackend.js +6 -3
- package/esm/vs/editor/common/model/tokens/abstractSyntaxTokenBackend.js.map +1 -1
- package/esm/vs/editor/common/model/tokens/annotations.js +177 -0
- package/esm/vs/editor/common/model/tokens/annotations.js.map +1 -0
- package/esm/vs/editor/common/model/tokens/tokenizationFontDecorationsProvider.js +131 -0
- package/esm/vs/editor/common/model/tokens/tokenizationFontDecorationsProvider.js.map +1 -0
- package/esm/vs/editor/common/model/tokens/tokenizationTextModelPart.js +9 -0
- package/esm/vs/editor/common/model/tokens/tokenizationTextModelPart.js.map +1 -1
- package/esm/vs/editor/common/model/tokens/tokenizerSyntaxTokenBackend.js +9 -0
- package/esm/vs/editor/common/model/tokens/tokenizerSyntaxTokenBackend.js.map +1 -1
- package/esm/vs/editor/common/textModelEditSource.js +2 -0
- package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
- package/esm/vs/editor/common/textModelEvents.js.map +1 -1
- package/esm/vs/editor/common/viewLayout/lineDecorations.js.map +1 -1
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +1 -1
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js.map +1 -1
- package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +54 -36
- package/esm/vs/editor/contrib/clipboard/browser/clipboard.js.map +1 -1
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +14 -1
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js.map +1 -1
- package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.css +1 -1
- package/esm/vs/editor/contrib/hover/browser/hover.css +1 -1
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +1 -1
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js.map +1 -1
- package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +1 -0
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commandIds.js +2 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commandIds.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +33 -4
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +13 -12
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +7 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js.map +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/inlineCompletions.contribution.js +2 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/InlineSuggestAlternativeAction.js +8 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/InlineSuggestAlternativeAction.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/editKind.js +198 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/editKind.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionIsVisible.js +40 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionIsVisible.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +128 -65
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +69 -13
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js +159 -94
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js +124 -50
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js +393 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/telemetry.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/utils.js +20 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/utils.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +59 -42
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +29 -8
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +78 -46
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js +9 -4
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +11 -4
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +81 -41
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.js +48 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +18 -15
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCollapsedView.js +3 -4
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCollapsedView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.js +6 -7
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsDeletionView.js +4 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsDeletionView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js +4 -3
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.js +8 -8
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.js +9 -7
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js +203 -41
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/jumpToView.js +189 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/jumpToView.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js +85 -102
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js +75 -32
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistnaceWidgetPlacement.js +121 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistnaceWidgetPlacement.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/originalEditorInlineDiffView.js +2 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/originalEditorInlineDiffView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +22 -20
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js +15 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/view.css +39 -6
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js +10 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js.map +1 -1
- 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/linesOperations/browser/linesOperations.js.map +1 -1
- package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
- package/esm/vs/editor/contrib/links/browser/links.js +10 -10
- package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
- package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
- package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
- package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +11 -11
- 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 +19 -11
- package/esm/vs/editor/contrib/rename/browser/rename.js.map +1 -1
- package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
- package/esm/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js +3 -2
- package/esm/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js.map +1 -1
- 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/snippetParser.js +33 -0
- package/esm/vs/editor/contrib/snippet/browser/snippetParser.js.map +1 -1
- 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 +12 -4
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js.map +1 -1
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +1 -0
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggest.js +9 -8
- package/esm/vs/editor/contrib/suggest/browser/suggest.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js +39 -28
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js +1 -0
- package/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +22 -18
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +28 -6
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js.map +1 -1
- 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 +19 -2
- package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js.map +1 -1
- package/esm/vs/editor/editor.api.d.ts +37 -2
- package/esm/vs/editor/standalone/browser/standaloneLanguages.js +2 -2
- package/esm/vs/editor/standalone/browser/standaloneLanguages.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneServices.js +11 -1
- package/esm/vs/editor/standalone/browser/standaloneServices.js.map +1 -1
- package/esm/vs/editor/standalone/common/monarch/monarchLexer.js +1 -1
- package/esm/vs/editor/standalone/common/monarch/monarchLexer.js.map +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.css +11 -8
- package/esm/vs/platform/actionWidget/browser/actionWidget.js +7 -7
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +5 -5
- package/esm/vs/platform/actions/browser/toolbar.js +2 -2
- package/esm/vs/platform/actions/common/actions.js +11 -4
- package/esm/vs/platform/actions/common/actions.js.map +1 -1
- package/esm/vs/platform/actions/common/menuService.js +2 -2
- package/esm/vs/platform/configuration/common/configurationRegistry.js +10 -10
- package/esm/vs/platform/contextkey/browser/contextKeyService.js +1 -1
- package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
- package/esm/vs/platform/contextkey/common/contextkeys.js +9 -9
- package/esm/vs/platform/contextkey/common/scanner.js +5 -5
- package/esm/vs/platform/{product/common/productService.js → defaultAccount/common/defaultAccount.js} +2 -2
- package/esm/vs/platform/defaultAccount/common/defaultAccount.js.map +1 -0
- 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/instantiation/common/instantiation.js.map +1 -1
- package/esm/vs/platform/instantiation/common/instantiationService.js +1 -8
- package/esm/vs/platform/instantiation/common/instantiationService.js.map +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/log/common/log.js +1 -1
- package/esm/vs/platform/log/common/log.js.map +1 -1
- package/esm/vs/platform/markers/common/markerService.js +6 -6
- package/esm/vs/platform/markers/common/markerService.js.map +1 -1
- package/esm/vs/platform/markers/common/markers.js +6 -6
- package/esm/vs/platform/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 +7 -3
- package/esm/vs/platform/quickinput/browser/quickInput.js +19 -11
- 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/quickInputController.js +6 -6
- package/esm/vs/platform/quickinput/browser/quickInputList.js +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
- package/esm/vs/platform/theme/common/colorUtils.js +2 -2
- package/esm/vs/platform/theme/common/colors/baseColors.js +18 -17
- package/esm/vs/platform/theme/common/colors/baseColors.js.map +1 -1
- 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 +13 -13
- package/esm/vs/platform/theme/common/colors/minimapColors.js.map +1 -1
- package/esm/vs/platform/theme/common/colors/miscColors.js +16 -16
- package/esm/vs/platform/theme/common/colors/quickpickColors.js +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 +21 -21
- package/esm/vs/platform/undoRedo/common/undoRedoService.js.map +1 -1
- package/esm/vs/platform/window/common/window.js +1 -1
- package/esm/vs/platform/window/common/window.js.map +1 -1
- package/esm/vs/platform/workspace/common/workspace.js +1 -1
- package/monaco.d.ts +37 -2
- package/package.json +2 -2
- package/version.txt +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js +0 -16
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js.map +0 -1
- package/esm/vs/platform/product/common/productService.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["vs/editor/contrib/rename/browser/rename.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;;AAEhG,OAAO,EAAE,KAAK,EAAE,MAAM,0C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AAK,EAAE,QAAQ,EAAE,GAAG,IAAI;IAC7G,MAAM,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;IACvB,UAAU,CAAC,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC;IACxC,MAAM,EAAE,cAAc,EAAE,GAAG,QAAQ,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;IAClE,OAAO,MAAM,CAAC,cAAc,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AACzD,CAAC,CAAC,CAAC;AAEH,+BAA+B,CAAC,uBAAuB,EAAE,KAAK,WAAW,QAAQ,EAAE,KAAK,EAAE,QAAQ;IACjG,MAAM,EAAE,cAAc,EAAE,GAAG,QAAQ,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;IAClE,MAAM,QAAQ,GAAG,IAAI,cAAc,CAAC,KAAK,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;IACrE,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,qBAAqB,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACzE,IAAI,GAAG,EAAE,YAAY,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IACnC,CAAC;IACD,OAAO,GAAG,CAAC;AACZ,CAAC,CAAC,CAAC;AAGH,uCAAuC;AACvC,QAAQ,CAAC,EAAE,CAAyB,UAAU,CAAC,aAAa,CAAC,CAAC,qBAAqB,CAAC;IACnF,EAAE,EAAE,QAAQ;IACZ,UAAU,EAAE;QACX,6BAA6B,EAAE;YAC9B,KAAK,iDAAyC;YAC9C,WAAW,EAAE,GAAG,CAAC,QAAQ,CAAC,IAAe,EAAE,+DAA+D,CAAC;YAC3G,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,SAAS;SACf;KACD;CACD,CAAC,CAAC","file":"rename.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 { alert } from '../../../../base/browser/ui/aria/aria.js';\nimport { raceCancellation } from '../../../../base/common/async.js';\nimport { CancellationToken, CancellationTokenSource } from '../../../../base/common/cancellation.js';\nimport { CancellationError, onUnexpectedError } from '../../../../base/common/errors.js';\nimport { isMarkdownString } from '../../../../base/common/htmlContent.js';\nimport { KeyCode, KeyMod } from '../../../../base/common/keyCodes.js';\nimport { DisposableStore } from '../../../../base/common/lifecycle.js';\nimport { assertType } from '../../../../base/common/types.js';\nimport { URI } from '../../../../base/common/uri.js';\nimport * as nls from '../../../../nls.js';\nimport { Action2, registerAction2 } from '../../../../platform/actions/common/actions.js';\nimport { ConfigurationScope, Extensions, IConfigurationRegistry } from '../../../../platform/configuration/common/configurationRegistry.js';\nimport { ContextKeyExpr } from '../../../../platform/contextkey/common/contextkey.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { KeybindingWeight } from '../../../../platform/keybinding/common/keybindingsRegistry.js';\nimport { ILogService } from '../../../../platform/log/common/log.js';\nimport { INotificationService } from '../../../../platform/notification/common/notification.js';\nimport { IEditorProgressService } from '../../../../platform/progress/common/progress.js';\nimport { Registry } from '../../../../platform/registry/common/platform.js';\nimport { ICodeEditor } from '../../../browser/editorBrowser.js';\nimport { EditorAction, EditorCommand, EditorContributionInstantiation, ServicesAccessor, registerEditorAction, registerEditorCommand, registerEditorContribution, registerModelAndPositionCommand } from '../../../browser/editorExtensions.js';\nimport { IBulkEditService } from '../../../browser/services/bulkEditService.js';\nimport { ICodeEditorService } from '../../../browser/services/codeEditorService.js';\nimport { IPosition, Position } from '../../../common/core/position.js';\nimport { Range } from '../../../common/core/range.js';\nimport { IEditorContribution } from '../../../common/editorCommon.js';\nimport { EditorContextKeys } from '../../../common/editorContextKeys.js';\nimport { LanguageFeatureRegistry } from '../../../common/languageFeatureRegistry.js';\nimport { NewSymbolNameTriggerKind, Rejection, RenameLocation, RenameProvider, WorkspaceEdit } from '../../../common/languages.js';\nimport { ITextModel } from '../../../common/model.js';\nimport { ILanguageFeaturesService } from '../../../common/services/languageFeatures.js';\nimport { ITextResourceConfigurationService } from '../../../common/services/textResourceConfiguration.js';\nimport { EditSources } from '../../../common/textModelEditSource.js';\nimport { CodeEditorStateFlag, EditorStateCancellationTokenSource } from '../../editorState/browser/editorState.js';\nimport { MessageController } from '../../message/browser/messageController.js';\nimport { CONTEXT_RENAME_INPUT_VISIBLE, RenameWidget } from './renameWidget.js';\n\nclass RenameSkeleton {\n\n\tprivate readonly _providers: RenameProvider[];\n\tprivate _providerRenameIdx: number = 0;\n\n\tconstructor(\n\t\tprivate readonly model: ITextModel,\n\t\tprivate readonly position: Position,\n\t\tregistry: LanguageFeatureRegistry<RenameProvider>\n\t) {\n\t\tthis._providers = registry.ordered(model);\n\t}\n\n\thasProvider() {\n\t\treturn this._providers.length > 0;\n\t}\n\n\tasync resolveRenameLocation(token: CancellationToken): Promise<RenameLocation & Rejection | undefined> {\n\n\t\tconst rejects: string[] = [];\n\n\t\tfor (this._providerRenameIdx = 0; this._providerRenameIdx < this._providers.length; this._providerRenameIdx++) {\n\t\t\tconst provider = this._providers[this._providerRenameIdx];\n\t\t\tif (!provider.resolveRenameLocation) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tconst res = await provider.resolveRenameLocation(this.model, this.position, token);\n\t\t\tif (!res) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (res.rejectReason) {\n\t\t\t\trejects.push(res.rejectReason);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn res;\n\t\t}\n\n\t\t// we are here when no provider prepared a location which means we can\n\t\t// just rely on the word under cursor and start with the first provider\n\t\tthis._providerRenameIdx = 0;\n\n\t\tconst word = this.model.getWordAtPosition(this.position);\n\t\tif (!word) {\n\t\t\treturn {\n\t\t\t\trange: Range.fromPositions(this.position),\n\t\t\t\ttext: '',\n\t\t\t\trejectReason: rejects.length > 0 ? rejects.join('\\n') : undefined\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\trange: new Range(this.position.lineNumber, word.startColumn, this.position.lineNumber, word.endColumn),\n\t\t\ttext: word.word,\n\t\t\trejectReason: rejects.length > 0 ? rejects.join('\\n') : undefined\n\t\t};\n\t}\n\n\tasync provideRenameEdits(newName: string, token: CancellationToken): Promise<WorkspaceEdit & Rejection> {\n\t\treturn this._provideRenameEdits(newName, this._providerRenameIdx, [], token);\n\t}\n\n\tprivate async _provideRenameEdits(newName: string, i: number, rejects: string[], token: CancellationToken): Promise<WorkspaceEdit & Rejection> {\n\t\tconst provider = this._providers[i];\n\t\tif (!provider) {\n\t\t\treturn {\n\t\t\t\tedits: [],\n\t\t\t\trejectReason: rejects.join('\\n')\n\t\t\t};\n\t\t}\n\n\t\tconst result = await provider.provideRenameEdits(this.model, this.position, newName, token);\n\t\tif (!result) {\n\t\t\treturn this._provideRenameEdits(newName, i + 1, rejects.concat(nls.localize('no result', \"No result.\")), token);\n\t\t} else if (result.rejectReason) {\n\t\t\treturn this._provideRenameEdits(newName, i + 1, rejects.concat(result.rejectReason), token);\n\t\t}\n\t\treturn result;\n\t}\n}\n\nexport async function rename(registry: LanguageFeatureRegistry<RenameProvider>, model: ITextModel, position: Position, newName: string): Promise<WorkspaceEdit & Rejection> {\n\tconst skeleton = new RenameSkeleton(model, position, registry);\n\tconst loc = await skeleton.resolveRenameLocation(CancellationToken.None);\n\tif (loc?.rejectReason) {\n\t\treturn { edits: [], rejectReason: loc.rejectReason };\n\t}\n\treturn skeleton.provideRenameEdits(newName, CancellationToken.None);\n}\n\n// --- register actions and commands\n\nclass RenameController implements IEditorContribution {\n\n\tpublic static readonly ID = 'editor.contrib.renameController';\n\n\tstatic get(editor: ICodeEditor): RenameController | null {\n\t\treturn editor.getContribution<RenameController>(RenameController.ID);\n\t}\n\n\tprivate readonly _renameWidget: RenameWidget;\n\tprivate readonly _disposableStore = new DisposableStore();\n\tprivate _cts: CancellationTokenSource = new CancellationTokenSource();\n\n\tconstructor(\n\t\tprivate readonly editor: ICodeEditor,\n\t\t@IInstantiationService private readonly _instaService: IInstantiationService,\n\t\t@INotificationService private readonly _notificationService: INotificationService,\n\t\t@IBulkEditService private readonly _bulkEditService: IBulkEditService,\n\t\t@IEditorProgressService private readonly _progressService: IEditorProgressService,\n\t\t@ILogService private readonly _logService: ILogService,\n\t\t@ITextResourceConfigurationService private readonly _configService: ITextResourceConfigurationService,\n\t\t@ILanguageFeaturesService private readonly _languageFeaturesService: ILanguageFeaturesService,\n\t) {\n\t\tthis._renameWidget = this._disposableStore.add(this._instaService.createInstance(RenameWidget, this.editor, ['acceptRenameInput', 'acceptRenameInputWithPreview']));\n\t}\n\n\tdispose(): void {\n\t\tthis._disposableStore.dispose();\n\t\tthis._cts.dispose(true);\n\t}\n\n\tasync run(): Promise<void> {\n\n\t\tconst trace = this._logService.trace.bind(this._logService, '[rename]');\n\n\t\t// set up cancellation token to prevent reentrant rename, this\n\t\t// is the parent to the resolve- and rename-tokens\n\t\tthis._cts.dispose(true);\n\t\tthis._cts = new CancellationTokenSource();\n\n\t\tif (!this.editor.hasModel()) {\n\t\t\ttrace('editor has no model');\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst position = this.editor.getPosition();\n\t\tconst skeleton = new RenameSkeleton(this.editor.getModel(), position, this._languageFeaturesService.renameProvider);\n\n\t\tif (!skeleton.hasProvider()) {\n\t\t\ttrace('skeleton has no provider');\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// part 1 - resolve rename location\n\t\tconst cts1 = new EditorStateCancellationTokenSource(this.editor, CodeEditorStateFlag.Position | CodeEditorStateFlag.Value, undefined, this._cts.token);\n\n\t\tlet loc: RenameLocation & Rejection | undefined;\n\t\ttry {\n\t\t\ttrace('resolving rename location');\n\t\t\tconst resolveLocationOperation = skeleton.resolveRenameLocation(cts1.token);\n\t\t\tthis._progressService.showWhile(resolveLocationOperation, 250);\n\t\t\tloc = await resolveLocationOperation;\n\t\t\ttrace('resolved rename location');\n\t\t} catch (e: unknown) {\n\t\t\tif (e instanceof CancellationError) {\n\t\t\t\ttrace('resolve rename location cancelled', JSON.stringify(e, null, '\\t'));\n\t\t\t} else {\n\t\t\t\ttrace('resolve rename location failed', e instanceof Error ? e : JSON.stringify(e, null, '\\t'));\n\t\t\t\tif (typeof e === 'string' || isMarkdownString(e)) {\n\t\t\t\t\tMessageController.get(this.editor)?.showMessage(e || nls.localize('resolveRenameLocationFailed', \"An unknown error occurred while resolving rename location\"), position);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn undefined;\n\n\t\t} finally {\n\t\t\tcts1.dispose();\n\t\t}\n\n\t\tif (!loc) {\n\t\t\ttrace('returning early - no loc');\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (loc.rejectReason) {\n\t\t\ttrace(`returning early - rejected with reason: ${loc.rejectReason}`, loc.rejectReason);\n\t\t\tMessageController.get(this.editor)?.showMessage(loc.rejectReason, position);\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (cts1.token.isCancellationRequested) {\n\t\t\ttrace('returning early - cts1 cancelled');\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// part 2 - do rename at location\n\t\tconst cts2 = new EditorStateCancellationTokenSource(this.editor, CodeEditorStateFlag.Position | CodeEditorStateFlag.Value, loc.range, this._cts.token);\n\n\t\tconst model = this.editor.getModel(); // @ulugbekna: assumes editor still has a model, otherwise, cts1 should've been cancelled\n\n\t\tconst newSymbolNamesProviders = this._languageFeaturesService.newSymbolNamesProvider.all(model);\n\n\t\tconst resolvedNewSymbolnamesProviders = await Promise.all(newSymbolNamesProviders.map(async p => [p, await p.supportsAutomaticNewSymbolNamesTriggerKind ?? false] as const));\n\n\t\tconst requestRenameSuggestions = (triggerKind: NewSymbolNameTriggerKind, cts: CancellationToken) => {\n\t\t\tlet providers = resolvedNewSymbolnamesProviders.slice();\n\n\t\t\tif (triggerKind === NewSymbolNameTriggerKind.Automatic) {\n\t\t\t\tproviders = providers.filter(([_, supportsAutomatic]) => supportsAutomatic);\n\t\t\t}\n\n\t\t\treturn providers.map(([p,]) => p.provideNewSymbolNames(model, loc.range, triggerKind, cts));\n\t\t};\n\n\t\ttrace('creating rename input field and awaiting its result');\n\t\tconst supportPreview = this._bulkEditService.hasPreviewHandler() && this._configService.getValue<boolean>(this.editor.getModel().uri, 'editor.rename.enablePreview');\n\t\tconst inputFieldResult = await this._renameWidget.getInput(\n\t\t\tloc.range,\n\t\t\tloc.text,\n\t\t\tsupportPreview,\n\t\t\tnewSymbolNamesProviders.length > 0 ? requestRenameSuggestions : undefined,\n\t\t\tcts2\n\t\t);\n\t\ttrace('received response from rename input field');\n\n\t\t// no result, only hint to focus the editor or not\n\t\tif (typeof inputFieldResult === 'boolean') {\n\t\t\ttrace(`returning early - rename input field response - ${inputFieldResult}`);\n\t\t\tif (inputFieldResult) {\n\t\t\t\tthis.editor.focus();\n\t\t\t}\n\t\t\tcts2.dispose();\n\t\t\treturn undefined;\n\t\t}\n\n\t\tthis.editor.focus();\n\n\t\ttrace('requesting rename edits');\n\t\tconst renameOperation = raceCancellation(skeleton.provideRenameEdits(inputFieldResult.newName, cts2.token), cts2.token).then(async renameResult => {\n\n\t\t\tif (!renameResult) {\n\t\t\t\ttrace('returning early - no rename edits result');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!this.editor.hasModel()) {\n\t\t\t\ttrace('returning early - no model after rename edits are provided');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (renameResult.rejectReason) {\n\t\t\t\ttrace(`returning early - rejected with reason: ${renameResult.rejectReason}`);\n\t\t\t\tthis._notificationService.info(renameResult.rejectReason);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// collapse selection to active end\n\t\t\tthis.editor.setSelection(Range.fromPositions(this.editor.getSelection().getPosition()));\n\n\t\t\ttrace('applying edits');\n\n\t\t\tthis._bulkEditService.apply(renameResult, {\n\t\t\t\teditor: this.editor,\n\t\t\t\tshowPreview: inputFieldResult.wantsPreview,\n\t\t\t\tlabel: nls.localize('label', \"Renaming '{0}' to '{1}'\", loc?.text, inputFieldResult.newName),\n\t\t\t\tcode: 'undoredo.rename',\n\t\t\t\tquotableLabel: nls.localize('quotableLabel', \"Renaming {0} to {1}\", loc?.text, inputFieldResult.newName),\n\t\t\t\trespectAutoSaveConfig: true,\n\t\t\t\treason: EditSources.rename(loc?.text, inputFieldResult.newName),\n\t\t\t}).then(result => {\n\t\t\t\ttrace('edits applied');\n\t\t\t\tif (result.ariaSummary) {\n\t\t\t\t\talert(nls.localize('aria', \"Successfully renamed '{0}' to '{1}'. Summary: {2}\", loc.text, inputFieldResult.newName, result.ariaSummary));\n\t\t\t\t}\n\t\t\t}).catch(err => {\n\t\t\t\ttrace(`error when applying edits ${JSON.stringify(err, null, '\\t')}`);\n\t\t\t\tthis._notificationService.error(nls.localize('rename.failedApply', \"Rename failed to apply edits\"));\n\t\t\t\tthis._logService.error(err);\n\t\t\t});\n\n\t\t}, err => {\n\t\t\ttrace('error when providing rename edits', JSON.stringify(err, null, '\\t'));\n\n\t\t\tthis._notificationService.error(nls.localize('rename.failed', \"Rename failed to compute edits\"));\n\t\t\tthis._logService.error(err);\n\n\t\t}).finally(() => {\n\t\t\tcts2.dispose();\n\t\t});\n\n\t\ttrace('returning rename operation');\n\n\t\tthis._progressService.showWhile(renameOperation, 250);\n\t\treturn renameOperation;\n\n\t}\n\n\tacceptRenameInput(wantsPreview: boolean): void {\n\t\tthis._renameWidget.acceptInput(wantsPreview);\n\t}\n\n\tcancelRenameInput(): void {\n\t\tthis._renameWidget.cancelInput(true, 'cancelRenameInput command');\n\t}\n\n\tfocusNextRenameSuggestion(): void {\n\t\tthis._renameWidget.focusNextRenameSuggestion();\n\t}\n\n\tfocusPreviousRenameSuggestion(): void {\n\t\tthis._renameWidget.focusPreviousRenameSuggestion();\n\t}\n}\n\n// ---- action implementation\n\nexport class RenameAction extends EditorAction {\n\n\tconstructor() {\n\t\tsuper({\n\t\t\tid: 'editor.action.rename',\n\t\t\tlabel: nls.localize2('rename.label', \"Rename Symbol\"),\n\t\t\tprecondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasRenameProvider),\n\t\t\tkbOpts: {\n\t\t\t\tkbExpr: EditorContextKeys.editorTextFocus,\n\t\t\t\tprimary: KeyCode.F2,\n\t\t\t\tweight: KeybindingWeight.EditorContrib\n\t\t\t},\n\t\t\tcontextMenuOpts: {\n\t\t\t\tgroup: '1_modification',\n\t\t\t\torder: 1.1\n\t\t\t},\n\t\t\tcanTriggerInlineEdits: true,\n\t\t});\n\t}\n\n\toverride runCommand(accessor: ServicesAccessor, args: [URI, IPosition]): void | Promise<void> {\n\t\tconst editorService = accessor.get(ICodeEditorService);\n\t\tconst [uri, pos] = Array.isArray(args) && args || [undefined, undefined];\n\n\t\tif (URI.isUri(uri) && Position.isIPosition(pos)) {\n\t\t\treturn editorService.openCodeEditor({ resource: uri }, editorService.getActiveCodeEditor()).then(editor => {\n\t\t\t\tif (!editor) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\teditor.setPosition(pos);\n\t\t\t\teditor.invokeWithinContext(accessor => {\n\t\t\t\t\tthis.reportTelemetry(accessor, editor);\n\t\t\t\t\treturn this.run(accessor, editor);\n\t\t\t\t});\n\t\t\t}, onUnexpectedError);\n\t\t}\n\n\t\treturn super.runCommand(accessor, args);\n\t}\n\n\trun(accessor: ServicesAccessor, editor: ICodeEditor): Promise<void> {\n\t\tconst logService = accessor.get(ILogService);\n\n\t\tconst controller = RenameController.get(editor);\n\n\t\tif (controller) {\n\t\t\tlogService.trace('[RenameAction] got controller, running...');\n\t\t\treturn controller.run();\n\t\t}\n\t\tlogService.trace('[RenameAction] returning early - controller missing');\n\t\treturn Promise.resolve();\n\t}\n}\n\nregisterEditorContribution(RenameController.ID, RenameController, EditorContributionInstantiation.Lazy);\nregisterEditorAction(RenameAction);\n\nconst RenameCommand = EditorCommand.bindToContribution<RenameController>(RenameController.get);\n\nregisterEditorCommand(new RenameCommand({\n\tid: 'acceptRenameInput',\n\tprecondition: CONTEXT_RENAME_INPUT_VISIBLE,\n\thandler: x => x.acceptRenameInput(false),\n\tkbOpts: {\n\t\tweight: KeybindingWeight.EditorContrib + 99,\n\t\tkbExpr: ContextKeyExpr.and(EditorContextKeys.focus, ContextKeyExpr.not('isComposing')),\n\t\tprimary: KeyCode.Enter\n\t}\n}));\n\nregisterEditorCommand(new RenameCommand({\n\tid: 'acceptRenameInputWithPreview',\n\tprecondition: ContextKeyExpr.and(CONTEXT_RENAME_INPUT_VISIBLE, ContextKeyExpr.has('config.editor.rename.enablePreview')),\n\thandler: x => x.acceptRenameInput(true),\n\tkbOpts: {\n\t\tweight: KeybindingWeight.EditorContrib + 99,\n\t\tkbExpr: ContextKeyExpr.and(EditorContextKeys.focus, ContextKeyExpr.not('isComposing')),\n\t\tprimary: KeyMod.CtrlCmd + KeyCode.Enter\n\t}\n}));\n\nregisterEditorCommand(new RenameCommand({\n\tid: 'cancelRenameInput',\n\tprecondition: CONTEXT_RENAME_INPUT_VISIBLE,\n\thandler: x => x.cancelRenameInput(),\n\tkbOpts: {\n\t\tweight: KeybindingWeight.EditorContrib + 99,\n\t\tkbExpr: EditorContextKeys.focus,\n\t\tprimary: KeyCode.Escape,\n\t\tsecondary: [KeyMod.Shift | KeyCode.Escape]\n\t}\n}));\n\nregisterAction2(class FocusNextRenameSuggestion extends Action2 {\n\tconstructor() {\n\t\tsuper({\n\t\t\tid: 'focusNextRenameSuggestion',\n\t\t\ttitle: {\n\t\t\t\t...nls.localize2('focusNextRenameSuggestion', \"Focus Next Rename Suggestion\"),\n\t\t\t},\n\t\t\tprecondition: CONTEXT_RENAME_INPUT_VISIBLE,\n\t\t\tkeybinding: [\n\t\t\t\t{\n\t\t\t\t\tprimary: KeyCode.DownArrow,\n\t\t\t\t\tweight: KeybindingWeight.EditorContrib + 99,\n\t\t\t\t}\n\t\t\t]\n\t\t});\n\t}\n\n\toverride run(accessor: ServicesAccessor): void {\n\t\tconst currentEditor = accessor.get(ICodeEditorService).getFocusedCodeEditor();\n\t\tif (!currentEditor) { return; }\n\n\t\tconst controller = RenameController.get(currentEditor);\n\t\tif (!controller) { return; }\n\n\t\tcontroller.focusNextRenameSuggestion();\n\t}\n});\n\nregisterAction2(class FocusPreviousRenameSuggestion extends Action2 {\n\tconstructor() {\n\t\tsuper({\n\t\t\tid: 'focusPreviousRenameSuggestion',\n\t\t\ttitle: {\n\t\t\t\t...nls.localize2('focusPreviousRenameSuggestion', \"Focus Previous Rename Suggestion\"),\n\t\t\t},\n\t\t\tprecondition: CONTEXT_RENAME_INPUT_VISIBLE,\n\t\t\tkeybinding: [\n\t\t\t\t{\n\t\t\t\t\tprimary: KeyCode.UpArrow,\n\t\t\t\t\tweight: KeybindingWeight.EditorContrib + 99,\n\t\t\t\t}\n\t\t\t]\n\t\t});\n\t}\n\n\toverride run(accessor: ServicesAccessor): void {\n\t\tconst currentEditor = accessor.get(ICodeEditorService).getFocusedCodeEditor();\n\t\tif (!currentEditor) { return; }\n\n\t\tconst controller = RenameController.get(currentEditor);\n\t\tif (!controller) { return; }\n\n\t\tcontroller.focusPreviousRenameSuggestion();\n\t}\n});\n\n// ---- api bridge command\n\nregisterModelAndPositionCommand('_executeDocumentRenameProvider', function (accessor, model, position, ...args) {\n\tconst [newName] = args;\n\tassertType(typeof newName === 'string');\n\tconst { renameProvider } = accessor.get(ILanguageFeaturesService);\n\treturn rename(renameProvider, model, position, newName);\n});\n\nregisterModelAndPositionCommand('_executePrepareRename', async function (accessor, model, position) {\n\tconst { renameProvider } = accessor.get(ILanguageFeaturesService);\n\tconst skeleton = new RenameSkeleton(model, position, renameProvider);\n\tconst loc = await skeleton.resolveRenameLocation(CancellationToken.None);\n\tif (loc?.rejectReason) {\n\t\tthrow new Error(loc.rejectReason);\n\t}\n\treturn loc;\n});\n\n\n//todo@jrieken use editor options world\nRegistry.as<IConfigurationRegistry>(Extensions.Configuration).registerConfiguration({\n\tid: 'editor',\n\tproperties: {\n\t\t'editor.rename.enablePreview': {\n\t\t\tscope: ConfigurationScope.LANGUAGE_OVERRIDABLE,\n\t\t\tdescription: nls.localize('enablePreview', \"Enable/disable the ability to preview changes before renaming\"),\n\t\t\tdefault: true,\n\t\t\ttype: 'boolean'\n\t\t}\n\t}\n});\n"]}
|
|
1
|
+
{"version":3,"sources":["vs/editor/contrib/rename/browser/rename.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;;AAEhG,OAAO,EAAE,KAAK,EAAE,MAAM,0CAA0C,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AACrG,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACzF,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAE1E,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AACrD,OAAO,KAAK,GAAG,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AAC1F,OAAO,EAAsB,UAAU,EAA0B,MAAM,oEAAoE,CAAC;AAC5I,OAAO,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AACtF,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AAEnG,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0DAA0D,CAAC;AAChG,OAAO,EAAE,sBAAsB,EAAE,MAAM,kDAAkD,CAAC;AAC1F,OAAO,EAAE,QAAQ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,QAAQ,EAAE,KAAK,EAAE,QAAQ;IACjG,MAAM,EAAE,cAAc,EAAE,GAAG,QAAQ,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;IAClE,MAAM,QAAQ,GAAG,IAAI,cAAc,CAAC,KAAK,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;IACrE,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,qBAAqB,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACzE,IAAI,GAAG,EAAE,YAAY,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IACnC,CAAC;IACD,OAAO,GAAG,CAAC;AACZ,CAAC,CAAC,CAAC;AAGH,uCAAuC;AACvC,QAAQ,CAAC,EAAE,CAAyB,UAAU,CAAC,aAAa,CAAC,CAAC,qBAAqB,CAAC;IACnF,EAAE,EAAE,QAAQ;IACZ,UAAU,EAAE;QACX,6BAA6B,EAAE;YAC9B,KAAK,iDAAyC;YAC9C,WAAW,EAAE,GAAG,CAAC,QAAQ,CAAC,IAAe,EAAE,+DAA+D,CAAC;YAC3G,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,SAAS;SACf;KACD;CACD,CAAC,CAAC","file":"rename.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 { alert } from '../../../../base/browser/ui/aria/aria.js';\nimport { raceCancellation } from '../../../../base/common/async.js';\nimport { CancellationToken, CancellationTokenSource } from '../../../../base/common/cancellation.js';\nimport { CancellationError, onUnexpectedError } from '../../../../base/common/errors.js';\nimport { isMarkdownString } from '../../../../base/common/htmlContent.js';\nimport { KeyCode, KeyMod } from '../../../../base/common/keyCodes.js';\nimport { DisposableStore } from '../../../../base/common/lifecycle.js';\nimport { assertType } from '../../../../base/common/types.js';\nimport { URI } from '../../../../base/common/uri.js';\nimport * as nls from '../../../../nls.js';\nimport { Action2, registerAction2 } from '../../../../platform/actions/common/actions.js';\nimport { ConfigurationScope, Extensions, IConfigurationRegistry } from '../../../../platform/configuration/common/configurationRegistry.js';\nimport { ContextKeyExpr } from '../../../../platform/contextkey/common/contextkey.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { KeybindingWeight } from '../../../../platform/keybinding/common/keybindingsRegistry.js';\nimport { ILogService } from '../../../../platform/log/common/log.js';\nimport { INotificationService } from '../../../../platform/notification/common/notification.js';\nimport { IEditorProgressService } from '../../../../platform/progress/common/progress.js';\nimport { Registry } from '../../../../platform/registry/common/platform.js';\nimport { ICodeEditor } from '../../../browser/editorBrowser.js';\nimport { EditorAction, EditorCommand, EditorContributionInstantiation, ServicesAccessor, registerEditorAction, registerEditorCommand, registerEditorContribution, registerModelAndPositionCommand } from '../../../browser/editorExtensions.js';\nimport { IBulkEditService } from '../../../browser/services/bulkEditService.js';\nimport { ICodeEditorService } from '../../../browser/services/codeEditorService.js';\nimport { IPosition, Position } from '../../../common/core/position.js';\nimport { Range } from '../../../common/core/range.js';\nimport { IEditorContribution } from '../../../common/editorCommon.js';\nimport { EditorContextKeys } from '../../../common/editorContextKeys.js';\nimport { LanguageFeatureRegistry } from '../../../common/languageFeatureRegistry.js';\nimport { NewSymbolNameTriggerKind, Rejection, RenameLocation, RenameProvider, WorkspaceEdit } from '../../../common/languages.js';\nimport { ITextModel } from '../../../common/model.js';\nimport { ILanguageFeaturesService } from '../../../common/services/languageFeatures.js';\nimport { ITextResourceConfigurationService } from '../../../common/services/textResourceConfiguration.js';\nimport { EditSources } from '../../../common/textModelEditSource.js';\nimport { CodeEditorStateFlag, EditorStateCancellationTokenSource } from '../../editorState/browser/editorState.js';\nimport { MessageController } from '../../message/browser/messageController.js';\nimport { CONTEXT_RENAME_INPUT_VISIBLE, RenameWidget } from './renameWidget.js';\n\nclass RenameSkeleton {\n\n\tprivate readonly _providers: RenameProvider[];\n\tprivate _providerRenameIdx: number = 0;\n\n\tconstructor(\n\t\tprivate readonly model: ITextModel,\n\t\tprivate readonly position: Position,\n\t\tregistry: LanguageFeatureRegistry<RenameProvider>\n\t) {\n\t\tthis._providers = registry.ordered(model);\n\t}\n\n\thasProvider() {\n\t\treturn this._providers.length > 0;\n\t}\n\n\tasync resolveRenameLocation(token: CancellationToken): Promise<RenameLocation & Rejection | undefined> {\n\n\t\tconst rejects: string[] = [];\n\n\t\tfor (this._providerRenameIdx = 0; this._providerRenameIdx < this._providers.length; this._providerRenameIdx++) {\n\t\t\tconst provider = this._providers[this._providerRenameIdx];\n\t\t\tif (!provider.resolveRenameLocation) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tconst res = await provider.resolveRenameLocation(this.model, this.position, token);\n\t\t\tif (!res) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (res.rejectReason) {\n\t\t\t\trejects.push(res.rejectReason);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn res;\n\t\t}\n\n\t\t// we are here when no provider prepared a location which means we can\n\t\t// just rely on the word under cursor and start with the first provider\n\t\tthis._providerRenameIdx = 0;\n\n\t\tconst word = this.model.getWordAtPosition(this.position);\n\t\tif (!word) {\n\t\t\treturn {\n\t\t\t\trange: Range.fromPositions(this.position),\n\t\t\t\ttext: '',\n\t\t\t\trejectReason: rejects.length > 0 ? rejects.join('\\n') : undefined\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\trange: new Range(this.position.lineNumber, word.startColumn, this.position.lineNumber, word.endColumn),\n\t\t\ttext: word.word,\n\t\t\trejectReason: rejects.length > 0 ? rejects.join('\\n') : undefined\n\t\t};\n\t}\n\n\tasync provideRenameEdits(newName: string, token: CancellationToken): Promise<WorkspaceEdit & Rejection> {\n\t\treturn this._provideRenameEdits(newName, this._providerRenameIdx, [], token);\n\t}\n\n\tprivate async _provideRenameEdits(newName: string, i: number, rejects: string[], token: CancellationToken): Promise<WorkspaceEdit & Rejection> {\n\t\tconst provider = this._providers[i];\n\t\tif (!provider) {\n\t\t\treturn {\n\t\t\t\tedits: [],\n\t\t\t\trejectReason: rejects.join('\\n')\n\t\t\t};\n\t\t}\n\n\t\tconst result = await provider.provideRenameEdits(this.model, this.position, newName, token);\n\t\tif (!result) {\n\t\t\treturn this._provideRenameEdits(newName, i + 1, rejects.concat(nls.localize('no result', \"No result.\")), token);\n\t\t} else if (result.rejectReason) {\n\t\t\treturn this._provideRenameEdits(newName, i + 1, rejects.concat(result.rejectReason), token);\n\t\t}\n\t\treturn result;\n\t}\n}\n\nexport function hasProvider(registry: LanguageFeatureRegistry<RenameProvider>, model: ITextModel): boolean {\n\tconst providers = registry.ordered(model);\n\treturn providers.length > 0;\n}\n\nexport async function rawRename(registry: LanguageFeatureRegistry<RenameProvider>, model: ITextModel, position: Position, newName: string, cancellationToken?: CancellationToken): Promise<WorkspaceEdit & Rejection> {\n\tconst skeleton = new RenameSkeleton(model, position, registry);\n\treturn skeleton.provideRenameEdits(newName, cancellationToken ?? CancellationToken.None);\n}\n\nexport async function rename(registry: LanguageFeatureRegistry<RenameProvider>, model: ITextModel, position: Position, newName: string): Promise<WorkspaceEdit & Rejection> {\n\tconst skeleton = new RenameSkeleton(model, position, registry);\n\tconst loc = await skeleton.resolveRenameLocation(CancellationToken.None);\n\tif (loc?.rejectReason) {\n\t\treturn { edits: [], rejectReason: loc.rejectReason };\n\t}\n\treturn skeleton.provideRenameEdits(newName, CancellationToken.None);\n}\n\n// --- register actions and commands\n\nclass RenameController implements IEditorContribution {\n\n\tpublic static readonly ID = 'editor.contrib.renameController';\n\n\tstatic get(editor: ICodeEditor): RenameController | null {\n\t\treturn editor.getContribution<RenameController>(RenameController.ID);\n\t}\n\n\tprivate readonly _renameWidget: RenameWidget;\n\tprivate readonly _disposableStore = new DisposableStore();\n\tprivate _cts: CancellationTokenSource = new CancellationTokenSource();\n\n\tconstructor(\n\t\tprivate readonly editor: ICodeEditor,\n\t\t@IInstantiationService private readonly _instaService: IInstantiationService,\n\t\t@INotificationService private readonly _notificationService: INotificationService,\n\t\t@IBulkEditService private readonly _bulkEditService: IBulkEditService,\n\t\t@IEditorProgressService private readonly _progressService: IEditorProgressService,\n\t\t@ILogService private readonly _logService: ILogService,\n\t\t@ITextResourceConfigurationService private readonly _configService: ITextResourceConfigurationService,\n\t\t@ILanguageFeaturesService private readonly _languageFeaturesService: ILanguageFeaturesService,\n\t) {\n\t\tthis._renameWidget = this._disposableStore.add(this._instaService.createInstance(RenameWidget, this.editor, ['acceptRenameInput', 'acceptRenameInputWithPreview']));\n\t}\n\n\tdispose(): void {\n\t\tthis._disposableStore.dispose();\n\t\tthis._cts.dispose(true);\n\t}\n\n\tasync run(): Promise<void> {\n\n\t\tconst trace = this._logService.trace.bind(this._logService, '[rename]');\n\n\t\t// set up cancellation token to prevent reentrant rename, this\n\t\t// is the parent to the resolve- and rename-tokens\n\t\tthis._cts.dispose(true);\n\t\tthis._cts = new CancellationTokenSource();\n\n\t\tif (!this.editor.hasModel()) {\n\t\t\ttrace('editor has no model');\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst position = this.editor.getPosition();\n\t\tconst skeleton = new RenameSkeleton(this.editor.getModel(), position, this._languageFeaturesService.renameProvider);\n\n\t\tif (!skeleton.hasProvider()) {\n\t\t\ttrace('skeleton has no provider');\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// part 1 - resolve rename location\n\t\tconst cts1 = new EditorStateCancellationTokenSource(this.editor, CodeEditorStateFlag.Position | CodeEditorStateFlag.Value, undefined, this._cts.token);\n\n\t\tlet loc: RenameLocation & Rejection | undefined;\n\t\ttry {\n\t\t\ttrace('resolving rename location');\n\t\t\tconst resolveLocationOperation = skeleton.resolveRenameLocation(cts1.token);\n\t\t\tthis._progressService.showWhile(resolveLocationOperation, 250);\n\t\t\tloc = await resolveLocationOperation;\n\t\t\ttrace('resolved rename location');\n\t\t} catch (e: unknown) {\n\t\t\tif (e instanceof CancellationError) {\n\t\t\t\ttrace('resolve rename location cancelled', JSON.stringify(e, null, '\\t'));\n\t\t\t} else {\n\t\t\t\ttrace('resolve rename location failed', e instanceof Error ? e : JSON.stringify(e, null, '\\t'));\n\t\t\t\tif (typeof e === 'string' || isMarkdownString(e)) {\n\t\t\t\t\tMessageController.get(this.editor)?.showMessage(e || nls.localize('resolveRenameLocationFailed', \"An unknown error occurred while resolving rename location\"), position);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn undefined;\n\n\t\t} finally {\n\t\t\tcts1.dispose();\n\t\t}\n\n\t\tif (!loc) {\n\t\t\ttrace('returning early - no loc');\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (loc.rejectReason) {\n\t\t\ttrace(`returning early - rejected with reason: ${loc.rejectReason}`, loc.rejectReason);\n\t\t\tMessageController.get(this.editor)?.showMessage(loc.rejectReason, position);\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (cts1.token.isCancellationRequested) {\n\t\t\ttrace('returning early - cts1 cancelled');\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// part 2 - do rename at location\n\t\tconst cts2 = new EditorStateCancellationTokenSource(this.editor, CodeEditorStateFlag.Position | CodeEditorStateFlag.Value, loc.range, this._cts.token);\n\n\t\tconst model = this.editor.getModel(); // @ulugbekna: assumes editor still has a model, otherwise, cts1 should've been cancelled\n\n\t\tconst newSymbolNamesProviders = this._languageFeaturesService.newSymbolNamesProvider.all(model);\n\n\t\tconst resolvedNewSymbolnamesProviders = await Promise.all(newSymbolNamesProviders.map(async p => [p, await p.supportsAutomaticNewSymbolNamesTriggerKind ?? false] as const));\n\n\t\tconst requestRenameSuggestions = (triggerKind: NewSymbolNameTriggerKind, cts: CancellationToken) => {\n\t\t\tlet providers = resolvedNewSymbolnamesProviders.slice();\n\n\t\t\tif (triggerKind === NewSymbolNameTriggerKind.Automatic) {\n\t\t\t\tproviders = providers.filter(([_, supportsAutomatic]) => supportsAutomatic);\n\t\t\t}\n\n\t\t\treturn providers.map(([p,]) => p.provideNewSymbolNames(model, loc.range, triggerKind, cts));\n\t\t};\n\n\t\ttrace('creating rename input field and awaiting its result');\n\t\tconst supportPreview = this._bulkEditService.hasPreviewHandler() && this._configService.getValue<boolean>(this.editor.getModel().uri, 'editor.rename.enablePreview');\n\t\tconst inputFieldResult = await this._renameWidget.getInput(\n\t\t\tloc.range,\n\t\t\tloc.text,\n\t\t\tsupportPreview,\n\t\t\tnewSymbolNamesProviders.length > 0 ? requestRenameSuggestions : undefined,\n\t\t\tcts2\n\t\t);\n\t\ttrace('received response from rename input field');\n\n\t\t// no result, only hint to focus the editor or not\n\t\tif (typeof inputFieldResult === 'boolean') {\n\t\t\ttrace(`returning early - rename input field response - ${inputFieldResult}`);\n\t\t\tif (inputFieldResult) {\n\t\t\t\tthis.editor.focus();\n\t\t\t}\n\t\t\tcts2.dispose();\n\t\t\treturn undefined;\n\t\t}\n\n\t\tthis.editor.focus();\n\n\t\ttrace('requesting rename edits');\n\t\tconst renameOperation = raceCancellation(skeleton.provideRenameEdits(inputFieldResult.newName, cts2.token), cts2.token).then(async renameResult => {\n\n\t\t\tif (!renameResult) {\n\t\t\t\ttrace('returning early - no rename edits result');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!this.editor.hasModel()) {\n\t\t\t\ttrace('returning early - no model after rename edits are provided');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (renameResult.rejectReason) {\n\t\t\t\ttrace(`returning early - rejected with reason: ${renameResult.rejectReason}`);\n\t\t\t\tthis._notificationService.info(renameResult.rejectReason);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// collapse selection to active end\n\t\t\tthis.editor.setSelection(Range.fromPositions(this.editor.getSelection().getPosition()));\n\n\t\t\ttrace('applying edits');\n\n\t\t\tthis._bulkEditService.apply(renameResult, {\n\t\t\t\teditor: this.editor,\n\t\t\t\tshowPreview: inputFieldResult.wantsPreview,\n\t\t\t\tlabel: nls.localize('label', \"Renaming '{0}' to '{1}'\", loc?.text, inputFieldResult.newName),\n\t\t\t\tcode: 'undoredo.rename',\n\t\t\t\tquotableLabel: nls.localize('quotableLabel', \"Renaming {0} to {1}\", loc?.text, inputFieldResult.newName),\n\t\t\t\trespectAutoSaveConfig: true,\n\t\t\t\treason: EditSources.rename(loc?.text, inputFieldResult.newName),\n\t\t\t}).then(result => {\n\t\t\t\ttrace('edits applied');\n\t\t\t\tif (result.ariaSummary) {\n\t\t\t\t\talert(nls.localize('aria', \"Successfully renamed '{0}' to '{1}'. Summary: {2}\", loc.text, inputFieldResult.newName, result.ariaSummary));\n\t\t\t\t}\n\t\t\t}).catch(err => {\n\t\t\t\ttrace(`error when applying edits ${JSON.stringify(err, null, '\\t')}`);\n\t\t\t\tthis._notificationService.error(nls.localize('rename.failedApply', \"Rename failed to apply edits\"));\n\t\t\t\tthis._logService.error(err);\n\t\t\t});\n\n\t\t}, err => {\n\t\t\ttrace('error when providing rename edits', JSON.stringify(err, null, '\\t'));\n\n\t\t\tthis._notificationService.error(nls.localize('rename.failed', \"Rename failed to compute edits\"));\n\t\t\tthis._logService.error(err);\n\n\t\t}).finally(() => {\n\t\t\tcts2.dispose();\n\t\t});\n\n\t\ttrace('returning rename operation');\n\n\t\tthis._progressService.showWhile(renameOperation, 250);\n\t\treturn renameOperation;\n\n\t}\n\n\tacceptRenameInput(wantsPreview: boolean): void {\n\t\tthis._renameWidget.acceptInput(wantsPreview);\n\t}\n\n\tcancelRenameInput(): void {\n\t\tthis._renameWidget.cancelInput(true, 'cancelRenameInput command');\n\t}\n\n\tfocusNextRenameSuggestion(): void {\n\t\tthis._renameWidget.focusNextRenameSuggestion();\n\t}\n\n\tfocusPreviousRenameSuggestion(): void {\n\t\tthis._renameWidget.focusPreviousRenameSuggestion();\n\t}\n}\n\n// ---- action implementation\n\nexport class RenameAction extends EditorAction {\n\n\tconstructor() {\n\t\tsuper({\n\t\t\tid: 'editor.action.rename',\n\t\t\tlabel: nls.localize2('rename.label', \"Rename Symbol\"),\n\t\t\tprecondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasRenameProvider),\n\t\t\tkbOpts: {\n\t\t\t\tkbExpr: EditorContextKeys.editorTextFocus,\n\t\t\t\tprimary: KeyCode.F2,\n\t\t\t\tweight: KeybindingWeight.EditorContrib\n\t\t\t},\n\t\t\tcontextMenuOpts: {\n\t\t\t\tgroup: '1_modification',\n\t\t\t\torder: 1.1\n\t\t\t},\n\t\t\tcanTriggerInlineEdits: true,\n\t\t});\n\t}\n\n\toverride runCommand(accessor: ServicesAccessor, args: [URI, IPosition]): void | Promise<void> {\n\t\tconst editorService = accessor.get(ICodeEditorService);\n\t\tconst [uri, pos] = Array.isArray(args) && args || [undefined, undefined];\n\n\t\tif (URI.isUri(uri) && Position.isIPosition(pos)) {\n\t\t\treturn editorService.openCodeEditor({ resource: uri }, editorService.getActiveCodeEditor()).then(editor => {\n\t\t\t\tif (!editor) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\teditor.setPosition(pos);\n\t\t\t\teditor.invokeWithinContext(accessor => {\n\t\t\t\t\tthis.reportTelemetry(accessor, editor);\n\t\t\t\t\treturn this.run(accessor, editor);\n\t\t\t\t});\n\t\t\t}, onUnexpectedError);\n\t\t}\n\n\t\treturn super.runCommand(accessor, args);\n\t}\n\n\trun(accessor: ServicesAccessor, editor: ICodeEditor): Promise<void> {\n\t\tconst logService = accessor.get(ILogService);\n\n\t\tconst controller = RenameController.get(editor);\n\n\t\tif (controller) {\n\t\t\tlogService.trace('[RenameAction] got controller, running...');\n\t\t\treturn controller.run();\n\t\t}\n\t\tlogService.trace('[RenameAction] returning early - controller missing');\n\t\treturn Promise.resolve();\n\t}\n}\n\nregisterEditorContribution(RenameController.ID, RenameController, EditorContributionInstantiation.Lazy);\nregisterEditorAction(RenameAction);\n\nconst RenameCommand = EditorCommand.bindToContribution<RenameController>(RenameController.get);\n\nregisterEditorCommand(new RenameCommand({\n\tid: 'acceptRenameInput',\n\tprecondition: CONTEXT_RENAME_INPUT_VISIBLE,\n\thandler: x => x.acceptRenameInput(false),\n\tkbOpts: {\n\t\tweight: KeybindingWeight.EditorContrib + 99,\n\t\tkbExpr: ContextKeyExpr.and(EditorContextKeys.focus, ContextKeyExpr.not('isComposing')),\n\t\tprimary: KeyCode.Enter\n\t}\n}));\n\nregisterEditorCommand(new RenameCommand({\n\tid: 'acceptRenameInputWithPreview',\n\tprecondition: ContextKeyExpr.and(CONTEXT_RENAME_INPUT_VISIBLE, ContextKeyExpr.has('config.editor.rename.enablePreview')),\n\thandler: x => x.acceptRenameInput(true),\n\tkbOpts: {\n\t\tweight: KeybindingWeight.EditorContrib + 99,\n\t\tkbExpr: ContextKeyExpr.and(EditorContextKeys.focus, ContextKeyExpr.not('isComposing')),\n\t\tprimary: KeyMod.CtrlCmd + KeyCode.Enter\n\t}\n}));\n\nregisterEditorCommand(new RenameCommand({\n\tid: 'cancelRenameInput',\n\tprecondition: CONTEXT_RENAME_INPUT_VISIBLE,\n\thandler: x => x.cancelRenameInput(),\n\tkbOpts: {\n\t\tweight: KeybindingWeight.EditorContrib + 99,\n\t\tkbExpr: EditorContextKeys.focus,\n\t\tprimary: KeyCode.Escape,\n\t\tsecondary: [KeyMod.Shift | KeyCode.Escape]\n\t}\n}));\n\nregisterAction2(class FocusNextRenameSuggestion extends Action2 {\n\tconstructor() {\n\t\tsuper({\n\t\t\tid: 'focusNextRenameSuggestion',\n\t\t\ttitle: {\n\t\t\t\t...nls.localize2('focusNextRenameSuggestion', \"Focus Next Rename Suggestion\"),\n\t\t\t},\n\t\t\tprecondition: CONTEXT_RENAME_INPUT_VISIBLE,\n\t\t\tkeybinding: [\n\t\t\t\t{\n\t\t\t\t\tprimary: KeyCode.DownArrow,\n\t\t\t\t\tweight: KeybindingWeight.EditorContrib + 99,\n\t\t\t\t}\n\t\t\t]\n\t\t});\n\t}\n\n\toverride run(accessor: ServicesAccessor): void {\n\t\tconst currentEditor = accessor.get(ICodeEditorService).getFocusedCodeEditor();\n\t\tif (!currentEditor) { return; }\n\n\t\tconst controller = RenameController.get(currentEditor);\n\t\tif (!controller) { return; }\n\n\t\tcontroller.focusNextRenameSuggestion();\n\t}\n});\n\nregisterAction2(class FocusPreviousRenameSuggestion extends Action2 {\n\tconstructor() {\n\t\tsuper({\n\t\t\tid: 'focusPreviousRenameSuggestion',\n\t\t\ttitle: {\n\t\t\t\t...nls.localize2('focusPreviousRenameSuggestion', \"Focus Previous Rename Suggestion\"),\n\t\t\t},\n\t\t\tprecondition: CONTEXT_RENAME_INPUT_VISIBLE,\n\t\t\tkeybinding: [\n\t\t\t\t{\n\t\t\t\t\tprimary: KeyCode.UpArrow,\n\t\t\t\t\tweight: KeybindingWeight.EditorContrib + 99,\n\t\t\t\t}\n\t\t\t]\n\t\t});\n\t}\n\n\toverride run(accessor: ServicesAccessor): void {\n\t\tconst currentEditor = accessor.get(ICodeEditorService).getFocusedCodeEditor();\n\t\tif (!currentEditor) { return; }\n\n\t\tconst controller = RenameController.get(currentEditor);\n\t\tif (!controller) { return; }\n\n\t\tcontroller.focusPreviousRenameSuggestion();\n\t}\n});\n\n// ---- api bridge command\n\nregisterModelAndPositionCommand('_executeDocumentRenameProvider', function (accessor, model, position, ...args) {\n\tconst [newName] = args;\n\tassertType(typeof newName === 'string');\n\tconst { renameProvider } = accessor.get(ILanguageFeaturesService);\n\treturn rename(renameProvider, model, position, newName);\n});\n\nregisterModelAndPositionCommand('_executePrepareRename', async function (accessor, model, position) {\n\tconst { renameProvider } = accessor.get(ILanguageFeaturesService);\n\tconst skeleton = new RenameSkeleton(model, position, renameProvider);\n\tconst loc = await skeleton.resolveRenameLocation(CancellationToken.None);\n\tif (loc?.rejectReason) {\n\t\tthrow new Error(loc.rejectReason);\n\t}\n\treturn loc;\n});\n\n\n//todo@jrieken use editor options world\nRegistry.as<IConfigurationRegistry>(Extensions.Configuration).registerConfiguration({\n\tid: 'editor',\n\tproperties: {\n\t\t'editor.rename.enablePreview': {\n\t\t\tscope: ConfigurationScope.LANGUAGE_OVERRIDABLE,\n\t\t\tdescription: nls.localize('enablePreview', \"Enable/disable the ability to preview changes before renaming\"),\n\t\t\tdefault: true,\n\t\t\ttype: 'boolean'\n\t\t}\n\t}\n});\n"]}
|
|
@@ -39,8 +39,8 @@ import { editorWidgetBackground, inputBackground, inputBorder, inputForeground,
|
|
|
39
39
|
import { IThemeService } from '../../../../platform/theme/common/themeService.js';
|
|
40
40
|
/** for debugging */
|
|
41
41
|
const _sticky = false;
|
|
42
|
-
export const CONTEXT_RENAME_INPUT_VISIBLE = new RawContextKey('renameInputVisible', false, nls.localize(
|
|
43
|
-
export const CONTEXT_RENAME_INPUT_FOCUSED = new RawContextKey('renameInputFocused', false, nls.localize(
|
|
42
|
+
export const CONTEXT_RENAME_INPUT_VISIBLE = new RawContextKey('renameInputVisible', false, nls.localize(1405, "Whether the rename input widget is visible"));
|
|
43
|
+
export const CONTEXT_RENAME_INPUT_FOCUSED = new RawContextKey('renameInputFocused', false, nls.localize(1406, "Whether the rename input widget is focused"));
|
|
44
44
|
let RenameWidget = class RenameWidget {
|
|
45
45
|
constructor(_editor, _acceptKeybindings, _themeService, _keybindingService, contextKeyService, _logService) {
|
|
46
46
|
this._editor = _editor;
|
|
@@ -163,7 +163,7 @@ let RenameWidget = class RenameWidget {
|
|
|
163
163
|
}
|
|
164
164
|
beforeRender() {
|
|
165
165
|
const [accept, preview] = this._acceptKeybindings;
|
|
166
|
-
this._label.innerText = nls.localize(
|
|
166
|
+
this._label.innerText = nls.localize(1407, "{0} to Rename, {1} to Preview", this._keybindingService.lookupKeybinding(accept)?.getLabel(), this._keybindingService.lookupKeybinding(preview)?.getLabel());
|
|
167
167
|
this._domNode.style.minWidth = `200px`; // to prevent from widening when candidates come in
|
|
168
168
|
return null;
|
|
169
169
|
}
|
|
@@ -477,7 +477,7 @@ class RenameCandidateListView {
|
|
|
477
477
|
// adjust list container layout
|
|
478
478
|
this._listContainer.style.height = `${height}px`;
|
|
479
479
|
this._listContainer.style.width = `${width}px`;
|
|
480
|
-
aria.status(nls.localize(
|
|
480
|
+
aria.status(nls.localize(1408, "Received {0} rename suggestions", candidates.length));
|
|
481
481
|
}
|
|
482
482
|
clearCandidates() {
|
|
483
483
|
this._listContainer.style.height = '0px';
|
|
@@ -619,13 +619,13 @@ class InputWithButton {
|
|
|
619
619
|
this._inputNode.className = 'rename-input';
|
|
620
620
|
this._inputNode.type = 'text';
|
|
621
621
|
this._inputNode.style.border = 'none';
|
|
622
|
-
this._inputNode.setAttribute('aria-label', nls.localize(
|
|
622
|
+
this._inputNode.setAttribute('aria-label', nls.localize(1409, "Rename input. Type new name and press Enter to commit."));
|
|
623
623
|
this._domNode.appendChild(this._inputNode);
|
|
624
624
|
this._buttonNode = document.createElement('div');
|
|
625
625
|
this._buttonNode.className = 'rename-suggestions-button';
|
|
626
626
|
this._buttonNode.setAttribute('tabindex', '0');
|
|
627
|
-
this._buttonGenHoverText = nls.localize(
|
|
628
|
-
this._buttonCancelHoverText = nls.localize(
|
|
627
|
+
this._buttonGenHoverText = nls.localize(1410, "Generate New Name Suggestions");
|
|
628
|
+
this._buttonCancelHoverText = nls.localize(1411, "Cancel");
|
|
629
629
|
this._buttonHoverContent = this._buttonGenHoverText;
|
|
630
630
|
this._disposables.add(getBaseLayerHoverDelegate().setupDelayedHover(this._buttonNode, () => ({
|
|
631
631
|
content: this._buttonHoverContent,
|
|
@@ -125,8 +125,9 @@ let SectionHeaderDetector = class SectionHeaderDetector extends Disposable {
|
|
|
125
125
|
const tokens = model.tokenization.getLineTokens(validRange.startLineNumber);
|
|
126
126
|
const idx = tokens.findTokenIndexAtOffset(validRange.startColumn - 1);
|
|
127
127
|
const tokenType = tokens.getStandardTokenType(idx);
|
|
128
|
-
const
|
|
129
|
-
|
|
128
|
+
const languageIdAtPosition = model.getLanguageIdAtPosition(validRange.startLineNumber, validRange.startColumn);
|
|
129
|
+
const tokenLanguageId = tokens.getLanguageId(idx);
|
|
130
|
+
return (tokenLanguageId === languageIdAtPosition && tokenType === 1 /* StandardTokenType.Comment */);
|
|
130
131
|
});
|
|
131
132
|
}
|
|
132
133
|
const oldDecorations = Object.values(this.currentOccurrences).map(occurrence => occurrence.decorationId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.ts","vs/editor/contrib/sectionHeaders/browser/sectionHeaders.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAqB,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACvF,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAElE,OAAO,EAAmC,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAInH,OAAO,EAAE,6BAA6B,EAAE,MAAM,4DAA4D,CAAC;AAE3G,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAGzE,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,UAAU;aAE7B,OAAE,GAAW,8BAAX,AAAyC,CAAC;IAQnE,YACkB,MAAmB,EACY,4BAA2D,EACpE,mBAAyC;QAEhF,KAAK,EAAE,CAAC;QAJS,WAAM,GAAN,MAAM,CAAa;QACY,iCAA4B,GAA5B,4BAA4B,CAA+B;QACpE,wBAAmB,GAAnB,mBAAmB,CAAsB;QAGhF,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,2BAA2B,EAAE,CAAC;QAE7D,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,SAAS,+BAAsB,CAAC,CAAC;QAC1E,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC3B,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC;QAE7B,IAAI,CAAC,SAAS,CA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a,CAAC;YAC7C,WAAW,EAAE,gBAAgB;YAC7B,UAAU,yDAAiD;YAC3D,qBAAqB,EAAE,IAAI;YAC3B,OAAO,EAAE;gBACR,KAAK,EAAE,SAAS;gBAChB,QAAQ,gCAAwB;gBAChC,kBAAkB,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC,8CAAsC,CAAC,yCAAiC;gBAC5H,iBAAiB,EAAE,aAAa,CAAC,IAAI;aACrC;SACD,CAAC;KACF,CAAC;AACH,CAAC;AAED,0BAA0B,CAAC,qBAAqB,CAAC,EAAE,EAAE,qBAAqB,2DAAmD,CAAC","file":"sectionHeaders.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 { CancelablePromise, RunOnceScheduler } from '../../../../base/common/async.js';\nimport { Disposable } from '../../../../base/common/lifecycle.js';\nimport { ICodeEditor } from '../../../browser/editorBrowser.js';\nimport { EditorContributionInstantiation, registerEditorContribution } from '../../../browser/editorExtensions.js';\nimport { EditorOption, IEditorMinimapOptions } from '../../../common/config/editorOptions.js';\nimport { IEditorContribution, IEditorDecorationsCollection } from '../../../common/editorCommon.js';\nimport { StandardTokenType } from '../../../common/encodedTokenAttributes.js';\nimport { ILanguageConfigurationService } from '../../../common/languages/languageConfigurationRegistry.js';\nimport { IModelDeltaDecoration, MinimapPosition, MinimapSectionHeaderStyle, TrackedRangeStickiness } from '../../../common/model.js';\nimport { ModelDecorationOptions } from '../../../common/model/textModel.js';\nimport { IEditorWorkerService } from '../../../common/services/editorWorker.js';\nimport { FindSectionHeaderOptions, SectionHeader } from '../../../common/services/findSectionHeaders.js';\n\nexport class SectionHeaderDetector extends Disposable implements IEditorContribution {\n\n\tpublic static readonly ID: string = 'editor.sectionHeaderDetector';\n\n\tprivate options: FindSectionHeaderOptions | undefined;\n\tprivate decorations: IEditorDecorationsCollection;\n\tprivate computeSectionHeaders: RunOnceScheduler;\n\tprivate computePromise: CancelablePromise<SectionHeader[]> | null;\n\tprivate currentOccurrences: { [decorationId: string]: SectionHeaderOccurrence };\n\n\tconstructor(\n\t\tprivate readonly editor: ICodeEditor,\n\t\t@ILanguageConfigurationService private readonly languageConfigurationService: ILanguageConfigurationService,\n\t\t@IEditorWorkerService private readonly editorWorkerService: IEditorWorkerService,\n\t) {\n\t\tsuper();\n\t\tthis.decorations = this.editor.createDecorationsCollection();\n\n\t\tthis.options = this.createOptions(editor.getOption(EditorOption.minimap));\n\t\tthis.computePromise = null;\n\t\tthis.currentOccurrences = {};\n\n\t\tthis._register(editor.onDidChangeModel((e) => {\n\t\t\tthis.currentOccurrences = {};\n\t\t\tthis.options = this.createOptions(editor.getOption(EditorOption.minimap));\n\t\t\tthis.stop();\n\t\t\tthis.computeSectionHeaders.schedule(0);\n\t\t}));\n\n\t\tthis._register(editor.onDidChangeModelLanguage((e) => {\n\t\t\tthis.currentOccurrences = {};\n\t\t\tthis.options = this.createOptions(editor.getOption(EditorOption.minimap));\n\t\t\tthis.stop();\n\t\t\tthis.computeSectionHeaders.schedule(0);\n\t\t}));\n\n\t\tthis._register(languageConfigurationService.onDidChange((e) => {\n\t\t\tconst editorLanguageId = this.editor.getModel()?.getLanguageId();\n\t\t\tif (editorLanguageId && e.affects(editorLanguageId)) {\n\t\t\t\tthis.currentOccurrences = {};\n\t\t\t\tthis.options = this.createOptions(editor.getOption(EditorOption.minimap));\n\t\t\t\tthis.stop();\n\t\t\t\tthis.computeSectionHeaders.schedule(0);\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(editor.onDidChangeConfiguration(e => {\n\t\t\tif (this.options && !e.hasChanged(EditorOption.minimap)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.options = this.createOptions(editor.getOption(EditorOption.minimap));\n\n\t\t\t// Remove any links (for the getting disabled case)\n\t\t\tthis.updateDecorations([]);\n\n\t\t\t// Stop any computation (for the getting disabled case)\n\t\t\tthis.stop();\n\n\t\t\t// Start computing (for the getting enabled case)\n\t\t\tthis.computeSectionHeaders.schedule(0);\n\t\t}));\n\n\t\tthis._register(this.editor.onDidChangeModelContent(e => {\n\t\t\tthis.computeSectionHeaders.schedule();\n\t\t}));\n\n\t\tthis._register(editor.onDidChangeModelTokens((e) => {\n\t\t\tif (!this.computeSectionHeaders.isScheduled()) {\n\t\t\t\tthis.computeSectionHeaders.schedule(1000);\n\t\t\t}\n\t\t}));\n\n\t\tthis.computeSectionHeaders = this._register(new RunOnceScheduler(() => {\n\t\t\tthis.findSectionHeaders();\n\t\t}, 250));\n\n\t\tthis.computeSectionHeaders.schedule(0);\n\t}\n\n\tprivate createOptions(minimap: Readonly<Required<IEditorMinimapOptions>>): FindSectionHeaderOptions | undefined {\n\t\tif (!minimap || !this.editor.hasModel()) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst languageId = this.editor.getModel().getLanguageId();\n\t\tif (!languageId) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst commentsConfiguration = this.languageConfigurationService.getLanguageConfiguration(languageId).comments;\n\t\tconst foldingRules = this.languageConfigurationService.getLanguageConfiguration(languageId).foldingRules;\n\n\t\tif (!commentsConfiguration && !foldingRules?.markers) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn {\n\t\t\tfoldingRules,\n\t\t\tmarkSectionHeaderRegex: minimap.markSectionHeaderRegex,\n\t\t\tfindMarkSectionHeaders: minimap.showMarkSectionHeaders,\n\t\t\tfindRegionSectionHeaders: minimap.showRegionSectionHeaders,\n\t\t};\n\t}\n\n\tprivate findSectionHeaders() {\n\t\tif (!this.editor.hasModel()\n\t\t\t|| (!this.options?.findMarkSectionHeaders && !this.options?.findRegionSectionHeaders)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst model = this.editor.getModel();\n\t\tif (model.isDisposed() || model.isTooLargeForSyncing()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst modelVersionId = model.getVersionId();\n\t\tthis.editorWorkerService.findSectionHeaders(model.uri, this.options)\n\t\t\t.then((sectionHeaders) => {\n\t\t\t\tif (model.isDisposed() || model.getVersionId() !== modelVersionId) {\n\t\t\t\t\t// model changed in the meantime\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.updateDecorations(sectionHeaders);\n\t\t\t});\n\t}\n\n\tprivate updateDecorations(sectionHeaders: SectionHeader[]): void {\n\n\t\tconst model = this.editor.getModel();\n\t\tif (model) {\n\t\t\t// Remove all section headers that should be in comments and are not in comments\n\t\t\tsectionHeaders = sectionHeaders.filter((sectionHeader) => {\n\t\t\t\tif (!sectionHeader.shouldBeInComments) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tconst validRange = model.validateRange(sectionHeader.range);\n\t\t\t\tconst tokens = model.tokenization.getLineTokens(validRange.startLineNumber);\n\t\t\t\tconst idx = tokens.findTokenIndexAtOffset(validRange.startColumn - 1);\n\t\t\t\tconst tokenType = tokens.getStandardTokenType(idx);\n\t\t\t\tconst languageId = tokens.getLanguageId(idx);\n\t\t\t\treturn (languageId === model.getLanguageId() && tokenType === StandardTokenType.Comment);\n\t\t\t});\n\t\t}\n\n\t\tconst oldDecorations = Object.values(this.currentOccurrences).map(occurrence => occurrence.decorationId);\n\t\tconst newDecorations = sectionHeaders.map(sectionHeader => decoration(sectionHeader));\n\n\t\tthis.editor.changeDecorations((changeAccessor) => {\n\t\t\tconst decorations = changeAccessor.deltaDecorations(oldDecorations, newDecorations);\n\n\t\t\tthis.currentOccurrences = {};\n\t\t\tfor (let i = 0, len = decorations.length; i < len; i++) {\n\t\t\t\tconst occurrence = { sectionHeader: sectionHeaders[i], decorationId: decorations[i] };\n\t\t\t\tthis.currentOccurrences[occurrence.decorationId] = occurrence;\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate stop(): void {\n\t\tthis.computeSectionHeaders.cancel();\n\t\tif (this.computePromise) {\n\t\t\tthis.computePromise.cancel();\n\t\t\tthis.computePromise = null;\n\t\t}\n\t}\n\n\tpublic override dispose(): void {\n\t\tsuper.dispose();\n\t\tthis.stop();\n\t\tthis.decorations.clear();\n\t}\n\n}\n\ninterface SectionHeaderOccurrence {\n\treadonly decorationId: string;\n}\n\nfunction decoration(sectionHeader: SectionHeader): IModelDeltaDecoration {\n\treturn {\n\t\trange: sectionHeader.range,\n\t\toptions: ModelDecorationOptions.createDynamic({\n\t\t\tdescription: 'section-header',\n\t\t\tstickiness: TrackedRangeStickiness.GrowsOnlyWhenTypingAfter,\n\t\t\tcollapseOnReplaceEdit: true,\n\t\t\tminimap: {\n\t\t\t\tcolor: undefined,\n\t\t\t\tposition: MinimapPosition.Inline,\n\t\t\t\tsectionHeaderStyle: sectionHeader.hasSeparatorLine ? MinimapSectionHeaderStyle.Underlined : MinimapSectionHeaderStyle.Normal,\n\t\t\t\tsectionHeaderText: sectionHeader.text,\n\t\t\t},\n\t\t})\n\t};\n}\n\nregisterEditorContribution(SectionHeaderDetector.ID, SectionHeaderDetector, EditorContributionInstantiation.AfterFirstRender);\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 { CancelablePromise, RunOnceScheduler } from '../../../../base/common/async.js';\nimport { Disposable } from '../../../../base/common/lifecycle.js';\nimport { ICodeEditor } from '../../../browser/editorBrowser.js';\nimport { EditorContributionInstantiation, registerEditorContribution } from '../../../browser/editorExtensions.js';\nimport { EditorOption, IEditorMinimapOptions } from '../../../common/config/editorOptions.js';\nimport { IEditorContribution, IEditorDecorationsCollection } from '../../../common/editorCommon.js';\nimport { StandardTokenType } from '../../../common/encodedTokenAttributes.js';\nimport { ILanguageConfigurationService } from '../../../common/languages/languageConfigurationRegistry.js';\nimport { IModelDeltaDecoration, MinimapPosition, MinimapSectionHeaderStyle, TrackedRangeStickiness } from '../../../common/model.js';\nimport { ModelDecorationOptions } from '../../../common/model/textModel.js';\nimport { IEditorWorkerService } from '../../../common/services/editorWorker.js';\nimport { FindSectionHeaderOptions, SectionHeader } from '../../../common/services/findSectionHeaders.js';\n\nexport class SectionHeaderDetector extends Disposable implements IEditorContribution {\n\n\tpublic static readonly ID: string = 'editor.sectionHeaderDetector';\n\n\tprivate options: FindSectionHeaderOptions | undefined;\n\tprivate decorations: IEditorDecorationsCollection;\n\tprivate computeSectionHeaders: RunOnceScheduler;\n\tprivate computePromise: CancelablePromise<SectionHeader[]> | null;\n\tprivate currentOccurrences: { [decorationId: string]: SectionHeaderOccurrence };\n\n\tconstructor(\n\t\tprivate readonly editor: ICodeEditor,\n\t\t@ILanguageConfigurationService private readonly languageConfigurationService: ILanguageConfigurationService,\n\t\t@IEditorWorkerService private readonly editorWorkerService: IEditorWorkerService,\n\t) {\n\t\tsuper();\n\t\tthis.decorations = this.editor.createDecorationsCollection();\n\n\t\tthis.options = this.createOptions(editor.getOption(EditorOption.minimap));\n\t\tthis.computePromise = null;\n\t\tthis.currentOccurrences = {};\n\n\t\tthis._register(editor.onDidChangeModel((e) => {\n\t\t\tthis.currentOccurrences = {};\n\t\t\tthis.options = this.createOptions(editor.getOption(EditorOption.minimap));\n\t\t\tthis.stop();\n\t\t\tthis.computeSectionHeaders.schedule(0);\n\t\t}));\n\n\t\tthis._register(editor.onDidChangeModelLanguage((e) => {\n\t\t\tthis.currentOccurrences = {};\n\t\t\tthis.options = this.createOptions(editor.getOption(EditorOption.minimap));\n\t\t\tthis.stop();\n\t\t\tthis.computeSectionHeaders.schedule(0);\n\t\t}));\n\n\t\tthis._register(languageConfigurationService.onDidChange((e) => {\n\t\t\tconst editorLanguageId = this.editor.getModel()?.getLanguageId();\n\t\t\tif (editorLanguageId && e.affects(editorLanguageId)) {\n\t\t\t\tthis.currentOccurrences = {};\n\t\t\t\tthis.options = this.createOptions(editor.getOption(EditorOption.minimap));\n\t\t\t\tthis.stop();\n\t\t\t\tthis.computeSectionHeaders.schedule(0);\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(editor.onDidChangeConfiguration(e => {\n\t\t\tif (this.options && !e.hasChanged(EditorOption.minimap)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.options = this.createOptions(editor.getOption(EditorOption.minimap));\n\n\t\t\t// Remove any links (for the getting disabled case)\n\t\t\tthis.updateDecorations([]);\n\n\t\t\t// Stop any computation (for the getting disabled case)\n\t\t\tthis.stop();\n\n\t\t\t// Start computing (for the getting enabled case)\n\t\t\tthis.computeSectionHeaders.schedule(0);\n\t\t}));\n\n\t\tthis._register(this.editor.onDidChangeModelContent(e => {\n\t\t\tthis.computeSectionHeaders.schedule();\n\t\t}));\n\n\t\tthis._register(editor.onDidChangeModelTokens((e) => {\n\t\t\tif (!this.computeSectionHeaders.isScheduled()) {\n\t\t\t\tthis.computeSectionHeaders.schedule(1000);\n\t\t\t}\n\t\t}));\n\n\t\tthis.computeSectionHeaders = this._register(new RunOnceScheduler(() => {\n\t\t\tthis.findSectionHeaders();\n\t\t}, 250));\n\n\t\tthis.computeSectionHeaders.schedule(0);\n\t}\n\n\tprivate createOptions(minimap: Readonly<Required<IEditorMinimapOptions>>): FindSectionHeaderOptions | undefined {\n\t\tif (!minimap || !this.editor.hasModel()) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst languageId = this.editor.getModel().getLanguageId();\n\t\tif (!languageId) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst commentsConfiguration = this.languageConfigurationService.getLanguageConfiguration(languageId).comments;\n\t\tconst foldingRules = this.languageConfigurationService.getLanguageConfiguration(languageId).foldingRules;\n\n\t\tif (!commentsConfiguration && !foldingRules?.markers) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn {\n\t\t\tfoldingRules,\n\t\t\tmarkSectionHeaderRegex: minimap.markSectionHeaderRegex,\n\t\t\tfindMarkSectionHeaders: minimap.showMarkSectionHeaders,\n\t\t\tfindRegionSectionHeaders: minimap.showRegionSectionHeaders,\n\t\t};\n\t}\n\n\tprivate findSectionHeaders() {\n\t\tif (!this.editor.hasModel()\n\t\t\t|| (!this.options?.findMarkSectionHeaders && !this.options?.findRegionSectionHeaders)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst model = this.editor.getModel();\n\t\tif (model.isDisposed() || model.isTooLargeForSyncing()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst modelVersionId = model.getVersionId();\n\t\tthis.editorWorkerService.findSectionHeaders(model.uri, this.options)\n\t\t\t.then((sectionHeaders) => {\n\t\t\t\tif (model.isDisposed() || model.getVersionId() !== modelVersionId) {\n\t\t\t\t\t// model changed in the meantime\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.updateDecorations(sectionHeaders);\n\t\t\t});\n\t}\n\n\tprivate updateDecorations(sectionHeaders: SectionHeader[]): void {\n\n\t\tconst model = this.editor.getModel();\n\t\tif (model) {\n\t\t\t// Remove all section headers that should be in comments and are not in comments\n\t\t\tsectionHeaders = sectionHeaders.filter((sectionHeader) => {\n\t\t\t\tif (!sectionHeader.shouldBeInComments) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tconst validRange = model.validateRange(sectionHeader.range);\n\t\t\t\tconst tokens = model.tokenization.getLineTokens(validRange.startLineNumber);\n\t\t\t\tconst idx = tokens.findTokenIndexAtOffset(validRange.startColumn - 1);\n\t\t\t\tconst tokenType = tokens.getStandardTokenType(idx);\n\t\t\t\tconst languageId = tokens.getLanguageId(idx);\n\t\t\t\treturn (languageId === model.getLanguageId() && tokenType === StandardTokenType.Comment);\n\t\t\t});\n\t\t}\n\n\t\tconst oldDecorations = Object.values(this.currentOccurrences).map(occurrence => occurrence.decorationId);\n\t\tconst newDecorations = sectionHeaders.map(sectionHeader => decoration(sectionHeader));\n\n\t\tthis.editor.changeDecorations((changeAccessor) => {\n\t\t\tconst decorations = changeAccessor.deltaDecorations(oldDecorations, newDecorations);\n\n\t\t\tthis.currentOccurrences = {};\n\t\t\tfor (let i = 0, len = decorations.length; i < len; i++) {\n\t\t\t\tconst occurrence = { sectionHeader: sectionHeaders[i], decorationId: decorations[i] };\n\t\t\t\tthis.currentOccurrences[occurrence.decorationId] = occurrence;\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate stop(): void {\n\t\tthis.computeSectionHeaders.cancel();\n\t\tif (this.computePromise) {\n\t\t\tthis.computePromise.cancel();\n\t\t\tthis.computePromise = null;\n\t\t}\n\t}\n\n\tpublic override dispose(): void {\n\t\tsuper.dispose();\n\t\tthis.stop();\n\t\tthis.decorations.clear();\n\t}\n\n}\n\ninterface SectionHeaderOccurrence {\n\treadonly decorationId: string;\n}\n\nfunction decoration(sectionHeader: SectionHeader): IModelDeltaDecoration {\n\treturn {\n\t\trange: sectionHeader.range,\n\t\toptions: ModelDecorationOptions.createDynamic({\n\t\t\tdescription: 'section-header',\n\t\t\tstickiness: TrackedRangeStickiness.GrowsOnlyWhenTypingAfter,\n\t\t\tcollapseOnReplaceEdit: true,\n\t\t\tminimap: {\n\t\t\t\tcolor: undefined,\n\t\t\t\tposition: MinimapPosition.Inline,\n\t\t\t\tsectionHeaderStyle: sectionHeader.hasSeparatorLine ? MinimapSectionHeaderStyle.Underlined : MinimapSectionHeaderStyle.Normal,\n\t\t\t\tsectionHeaderText: sectionHeader.text,\n\t\t\t},\n\t\t})\n\t};\n}\n\nregisterEditorContribution(SectionHeaderDetector.ID, SectionHeaderDetector, EditorContributionInstantiation.AfterFirstRender);\n"]}
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.ts","vs/editor/contrib/sectionHeaders/browser/sectionHeaders.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAqB,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACvF,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAElE,OAAO,E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file":"sectionHeaders.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 { CancelablePromise, RunOnceScheduler } from '../../../../base/common/async.js';\nimport { Disposable } from '../../../../base/common/lifecycle.js';\nimport { ICodeEditor } from '../../../browser/editorBrowser.js';\nimport { EditorContributionInstantiation, registerEditorContribution } from '../../../browser/editorExtensions.js';\nimport { EditorOption, IEditorMinimapOptions } from '../../../common/config/editorOptions.js';\nimport { IEditorContribution, IEditorDecorationsCollection } from '../../../common/editorCommon.js';\nimport { StandardTokenType } from '../../../common/encodedTokenAttributes.js';\nimport { ILanguageConfigurationService } from '../../../common/languages/languageConfigurationRegistry.js';\nimport { IModelDeltaDecoration, MinimapPosition, MinimapSectionHeaderStyle, TrackedRangeStickiness } from '../../../common/model.js';\nimport { ModelDecorationOptions } from '../../../common/model/textModel.js';\nimport { IEditorWorkerService } from '../../../common/services/editorWorker.js';\nimport { FindSectionHeaderOptions, SectionHeader } from '../../../common/services/findSectionHeaders.js';\n\nexport class SectionHeaderDetector extends Disposable implements IEditorContribution {\n\n\tpublic static readonly ID: string = 'editor.sectionHeaderDetector';\n\n\tprivate options: FindSectionHeaderOptions | undefined;\n\tprivate decorations: IEditorDecorationsCollection;\n\tprivate computeSectionHeaders: RunOnceScheduler;\n\tprivate computePromise: CancelablePromise<SectionHeader[]> | null;\n\tprivate currentOccurrences: { [decorationId: string]: SectionHeaderOccurrence };\n\n\tconstructor(\n\t\tprivate readonly editor: ICodeEditor,\n\t\t@ILanguageConfigurationService private readonly languageConfigurationService: ILanguageConfigurationService,\n\t\t@IEditorWorkerService private readonly editorWorkerService: IEditorWorkerService,\n\t) {\n\t\tsuper();\n\t\tthis.decorations = this.editor.createDecorationsCollection();\n\n\t\tthis.options = this.createOptions(editor.getOption(EditorOption.minimap));\n\t\tthis.computePromise = null;\n\t\tthis.currentOccurrences = {};\n\n\t\tthis._register(editor.onDidChangeModel((e) => {\n\t\t\tthis.currentOccurrences = {};\n\t\t\tthis.options = this.createOptions(editor.getOption(EditorOption.minimap));\n\t\t\tthis.stop();\n\t\t\tthis.computeSectionHeaders.schedule(0);\n\t\t}));\n\n\t\tthis._register(editor.onDidChangeModelLanguage((e) => {\n\t\t\tthis.currentOccurrences = {};\n\t\t\tthis.options = this.createOptions(editor.getOption(EditorOption.minimap));\n\t\t\tthis.stop();\n\t\t\tthis.computeSectionHeaders.schedule(0);\n\t\t}));\n\n\t\tthis._register(languageConfigurationService.onDidChange((e) => {\n\t\t\tconst editorLanguageId = this.editor.getModel()?.getLanguageId();\n\t\t\tif (editorLanguageId && e.affects(editorLanguageId)) {\n\t\t\t\tthis.currentOccurrences = {};\n\t\t\t\tthis.options = this.createOptions(editor.getOption(EditorOption.minimap));\n\t\t\t\tthis.stop();\n\t\t\t\tthis.computeSectionHeaders.schedule(0);\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(editor.onDidChangeConfiguration(e => {\n\t\t\tif (this.options && !e.hasChanged(EditorOption.minimap)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.options = this.createOptions(editor.getOption(EditorOption.minimap));\n\n\t\t\t// Remove any links (for the getting disabled case)\n\t\t\tthis.updateDecorations([]);\n\n\t\t\t// Stop any computation (for the getting disabled case)\n\t\t\tthis.stop();\n\n\t\t\t// Start computing (for the getting enabled case)\n\t\t\tthis.computeSectionHeaders.schedule(0);\n\t\t}));\n\n\t\tthis._register(this.editor.onDidChangeModelContent(e => {\n\t\t\tthis.computeSectionHeaders.schedule();\n\t\t}));\n\n\t\tthis._register(editor.onDidChangeModelTokens((e) => {\n\t\t\tif (!this.computeSectionHeaders.isScheduled()) {\n\t\t\t\tthis.computeSectionHeaders.schedule(1000);\n\t\t\t}\n\t\t}));\n\n\t\tthis.computeSectionHeaders = this._register(new RunOnceScheduler(() => {\n\t\t\tthis.findSectionHeaders();\n\t\t}, 250));\n\n\t\tthis.computeSectionHeaders.schedule(0);\n\t}\n\n\tprivate createOptions(minimap: Readonly<Required<IEditorMinimapOptions>>): FindSectionHeaderOptions | undefined {\n\t\tif (!minimap || !this.editor.hasModel()) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst languageId = this.editor.getModel().getLanguageId();\n\t\tif (!languageId) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst commentsConfiguration = this.languageConfigurationService.getLanguageConfiguration(languageId).comments;\n\t\tconst foldingRules = this.languageConfigurationService.getLanguageConfiguration(languageId).foldingRules;\n\n\t\tif (!commentsConfiguration && !foldingRules?.markers) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn {\n\t\t\tfoldingRules,\n\t\t\tmarkSectionHeaderRegex: minimap.markSectionHeaderRegex,\n\t\t\tfindMarkSectionHeaders: minimap.showMarkSectionHeaders,\n\t\t\tfindRegionSectionHeaders: minimap.showRegionSectionHeaders,\n\t\t};\n\t}\n\n\tprivate findSectionHeaders() {\n\t\tif (!this.editor.hasModel()\n\t\t\t|| (!this.options?.findMarkSectionHeaders && !this.options?.findRegionSectionHeaders)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst model = this.editor.getModel();\n\t\tif (model.isDisposed() || model.isTooLargeForSyncing()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst modelVersionId = model.getVersionId();\n\t\tthis.editorWorkerService.findSectionHeaders(model.uri, this.options)\n\t\t\t.then((sectionHeaders) => {\n\t\t\t\tif (model.isDisposed() || model.getVersionId() !== modelVersionId) {\n\t\t\t\t\t// model changed in the meantime\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.updateDecorations(sectionHeaders);\n\t\t\t});\n\t}\n\n\tprivate updateDecorations(sectionHeaders: SectionHeader[]): void {\n\n\t\tconst model = this.editor.getModel();\n\t\tif (model) {\n\t\t\t// Remove all section headers that should be in comments and are not in comments\n\t\t\tsectionHeaders = sectionHeaders.filter((sectionHeader) => {\n\t\t\t\tif (!sectionHeader.shouldBeInComments) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tconst validRange = model.validateRange(sectionHeader.range);\n\t\t\t\tconst tokens = model.tokenization.getLineTokens(validRange.startLineNumber);\n\t\t\t\tconst idx = tokens.findTokenIndexAtOffset(validRange.startColumn - 1);\n\t\t\t\tconst tokenType = tokens.getStandardTokenType(idx);\n\n\t\t\t\tconst languageIdAtPosition = model.getLanguageIdAtPosition(validRange.startLineNumber, validRange.startColumn);\n\t\t\t\tconst tokenLanguageId = tokens.getLanguageId(idx);\n\t\t\t\treturn (tokenLanguageId === languageIdAtPosition && tokenType === StandardTokenType.Comment);\n\t\t\t});\n\t\t}\n\n\t\tconst oldDecorations = Object.values(this.currentOccurrences).map(occurrence => occurrence.decorationId);\n\t\tconst newDecorations = sectionHeaders.map(sectionHeader => decoration(sectionHeader));\n\n\t\tthis.editor.changeDecorations((changeAccessor) => {\n\t\t\tconst decorations = changeAccessor.deltaDecorations(oldDecorations, newDecorations);\n\n\t\t\tthis.currentOccurrences = {};\n\t\t\tfor (let i = 0, len = decorations.length; i < len; i++) {\n\t\t\t\tconst occurrence = { sectionHeader: sectionHeaders[i], decorationId: decorations[i] };\n\t\t\t\tthis.currentOccurrences[occurrence.decorationId] = occurrence;\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate stop(): void {\n\t\tthis.computeSectionHeaders.cancel();\n\t\tif (this.computePromise) {\n\t\t\tthis.computePromise.cancel();\n\t\t\tthis.computePromise = null;\n\t\t}\n\t}\n\n\tpublic override dispose(): void {\n\t\tsuper.dispose();\n\t\tthis.stop();\n\t\tthis.decorations.clear();\n\t}\n\n}\n\ninterface SectionHeaderOccurrence {\n\treadonly decorationId: string;\n}\n\nfunction decoration(sectionHeader: SectionHeader): IModelDeltaDecoration {\n\treturn {\n\t\trange: sectionHeader.range,\n\t\toptions: ModelDecorationOptions.createDynamic({\n\t\t\tdescription: 'section-header',\n\t\t\tstickiness: TrackedRangeStickiness.GrowsOnlyWhenTypingAfter,\n\t\t\tcollapseOnReplaceEdit: true,\n\t\t\tminimap: {\n\t\t\t\tcolor: undefined,\n\t\t\t\tposition: MinimapPosition.Inline,\n\t\t\t\tsectionHeaderStyle: sectionHeader.hasSeparatorLine ? MinimapSectionHeaderStyle.Underlined : MinimapSectionHeaderStyle.Normal,\n\t\t\t\tsectionHeaderText: sectionHeader.text,\n\t\t\t},\n\t\t})\n\t};\n}\n\nregisterEditorContribution(SectionHeaderDetector.ID, SectionHeaderDetector, EditorContributionInstantiation.AfterFirstRender);\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 { CancelablePromise, RunOnceScheduler } from '../../../../base/common/async.js';\nimport { Disposable } from '../../../../base/common/lifecycle.js';\nimport { ICodeEditor } from '../../../browser/editorBrowser.js';\nimport { EditorContributionInstantiation, registerEditorContribution } from '../../../browser/editorExtensions.js';\nimport { EditorOption, IEditorMinimapOptions } from '../../../common/config/editorOptions.js';\nimport { IEditorContribution, IEditorDecorationsCollection } from '../../../common/editorCommon.js';\nimport { StandardTokenType } from '../../../common/encodedTokenAttributes.js';\nimport { ILanguageConfigurationService } from '../../../common/languages/languageConfigurationRegistry.js';\nimport { IModelDeltaDecoration, MinimapPosition, MinimapSectionHeaderStyle, TrackedRangeStickiness } from '../../../common/model.js';\nimport { ModelDecorationOptions } from '../../../common/model/textModel.js';\nimport { IEditorWorkerService } from '../../../common/services/editorWorker.js';\nimport { FindSectionHeaderOptions, SectionHeader } from '../../../common/services/findSectionHeaders.js';\n\nexport class SectionHeaderDetector extends Disposable implements IEditorContribution {\n\n\tpublic static readonly ID: string = 'editor.sectionHeaderDetector';\n\n\tprivate options: FindSectionHeaderOptions | undefined;\n\tprivate decorations: IEditorDecorationsCollection;\n\tprivate computeSectionHeaders: RunOnceScheduler;\n\tprivate computePromise: CancelablePromise<SectionHeader[]> | null;\n\tprivate currentOccurrences: { [decorationId: string]: SectionHeaderOccurrence };\n\n\tconstructor(\n\t\tprivate readonly editor: ICodeEditor,\n\t\t@ILanguageConfigurationService private readonly languageConfigurationService: ILanguageConfigurationService,\n\t\t@IEditorWorkerService private readonly editorWorkerService: IEditorWorkerService,\n\t) {\n\t\tsuper();\n\t\tthis.decorations = this.editor.createDecorationsCollection();\n\n\t\tthis.options = this.createOptions(editor.getOption(EditorOption.minimap));\n\t\tthis.computePromise = null;\n\t\tthis.currentOccurrences = {};\n\n\t\tthis._register(editor.onDidChangeModel((e) => {\n\t\t\tthis.currentOccurrences = {};\n\t\t\tthis.options = this.createOptions(editor.getOption(EditorOption.minimap));\n\t\t\tthis.stop();\n\t\t\tthis.computeSectionHeaders.schedule(0);\n\t\t}));\n\n\t\tthis._register(editor.onDidChangeModelLanguage((e) => {\n\t\t\tthis.currentOccurrences = {};\n\t\t\tthis.options = this.createOptions(editor.getOption(EditorOption.minimap));\n\t\t\tthis.stop();\n\t\t\tthis.computeSectionHeaders.schedule(0);\n\t\t}));\n\n\t\tthis._register(languageConfigurationService.onDidChange((e) => {\n\t\t\tconst editorLanguageId = this.editor.getModel()?.getLanguageId();\n\t\t\tif (editorLanguageId && e.affects(editorLanguageId)) {\n\t\t\t\tthis.currentOccurrences = {};\n\t\t\t\tthis.options = this.createOptions(editor.getOption(EditorOption.minimap));\n\t\t\t\tthis.stop();\n\t\t\t\tthis.computeSectionHeaders.schedule(0);\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(editor.onDidChangeConfiguration(e => {\n\t\t\tif (this.options && !e.hasChanged(EditorOption.minimap)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.options = this.createOptions(editor.getOption(EditorOption.minimap));\n\n\t\t\t// Remove any links (for the getting disabled case)\n\t\t\tthis.updateDecorations([]);\n\n\t\t\t// Stop any computation (for the getting disabled case)\n\t\t\tthis.stop();\n\n\t\t\t// Start computing (for the getting enabled case)\n\t\t\tthis.computeSectionHeaders.schedule(0);\n\t\t}));\n\n\t\tthis._register(this.editor.onDidChangeModelContent(e => {\n\t\t\tthis.computeSectionHeaders.schedule();\n\t\t}));\n\n\t\tthis._register(editor.onDidChangeModelTokens((e) => {\n\t\t\tif (!this.computeSectionHeaders.isScheduled()) {\n\t\t\t\tthis.computeSectionHeaders.schedule(1000);\n\t\t\t}\n\t\t}));\n\n\t\tthis.computeSectionHeaders = this._register(new RunOnceScheduler(() => {\n\t\t\tthis.findSectionHeaders();\n\t\t}, 250));\n\n\t\tthis.computeSectionHeaders.schedule(0);\n\t}\n\n\tprivate createOptions(minimap: Readonly<Required<IEditorMinimapOptions>>): FindSectionHeaderOptions | undefined {\n\t\tif (!minimap || !this.editor.hasModel()) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst languageId = this.editor.getModel().getLanguageId();\n\t\tif (!languageId) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst commentsConfiguration = this.languageConfigurationService.getLanguageConfiguration(languageId).comments;\n\t\tconst foldingRules = this.languageConfigurationService.getLanguageConfiguration(languageId).foldingRules;\n\n\t\tif (!commentsConfiguration && !foldingRules?.markers) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn {\n\t\t\tfoldingRules,\n\t\t\tmarkSectionHeaderRegex: minimap.markSectionHeaderRegex,\n\t\t\tfindMarkSectionHeaders: minimap.showMarkSectionHeaders,\n\t\t\tfindRegionSectionHeaders: minimap.showRegionSectionHeaders,\n\t\t};\n\t}\n\n\tprivate findSectionHeaders() {\n\t\tif (!this.editor.hasModel()\n\t\t\t|| (!this.options?.findMarkSectionHeaders && !this.options?.findRegionSectionHeaders)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst model = this.editor.getModel();\n\t\tif (model.isDisposed() || model.isTooLargeForSyncing()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst modelVersionId = model.getVersionId();\n\t\tthis.editorWorkerService.findSectionHeaders(model.uri, this.options)\n\t\t\t.then((sectionHeaders) => {\n\t\t\t\tif (model.isDisposed() || model.getVersionId() !== modelVersionId) {\n\t\t\t\t\t// model changed in the meantime\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.updateDecorations(sectionHeaders);\n\t\t\t});\n\t}\n\n\tprivate updateDecorations(sectionHeaders: SectionHeader[]): void {\n\n\t\tconst model = this.editor.getModel();\n\t\tif (model) {\n\t\t\t// Remove all section headers that should be in comments and are not in comments\n\t\t\tsectionHeaders = sectionHeaders.filter((sectionHeader) => {\n\t\t\t\tif (!sectionHeader.shouldBeInComments) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tconst validRange = model.validateRange(sectionHeader.range);\n\t\t\t\tconst tokens = model.tokenization.getLineTokens(validRange.startLineNumber);\n\t\t\t\tconst idx = tokens.findTokenIndexAtOffset(validRange.startColumn - 1);\n\t\t\t\tconst tokenType = tokens.getStandardTokenType(idx);\n\n\t\t\t\tconst languageIdAtPosition = model.getLanguageIdAtPosition(validRange.startLineNumber, validRange.startColumn);\n\t\t\t\tconst tokenLanguageId = tokens.getLanguageId(idx);\n\t\t\t\treturn (tokenLanguageId === languageIdAtPosition && tokenType === StandardTokenType.Comment);\n\t\t\t});\n\t\t}\n\n\t\tconst oldDecorations = Object.values(this.currentOccurrences).map(occurrence => occurrence.decorationId);\n\t\tconst newDecorations = sectionHeaders.map(sectionHeader => decoration(sectionHeader));\n\n\t\tthis.editor.changeDecorations((changeAccessor) => {\n\t\t\tconst decorations = changeAccessor.deltaDecorations(oldDecorations, newDecorations);\n\n\t\t\tthis.currentOccurrences = {};\n\t\t\tfor (let i = 0, len = decorations.length; i < len; i++) {\n\t\t\t\tconst occurrence = { sectionHeader: sectionHeaders[i], decorationId: decorations[i] };\n\t\t\t\tthis.currentOccurrences[occurrence.decorationId] = occurrence;\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate stop(): void {\n\t\tthis.computeSectionHeaders.cancel();\n\t\tif (this.computePromise) {\n\t\t\tthis.computePromise.cancel();\n\t\t\tthis.computePromise = null;\n\t\t}\n\t}\n\n\tpublic override dispose(): void {\n\t\tsuper.dispose();\n\t\tthis.stop();\n\t\tthis.decorations.clear();\n\t}\n\n}\n\ninterface SectionHeaderOccurrence {\n\treadonly decorationId: string;\n}\n\nfunction decoration(sectionHeader: SectionHeader): IModelDeltaDecoration {\n\treturn {\n\t\trange: sectionHeader.range,\n\t\toptions: ModelDecorationOptions.createDynamic({\n\t\t\tdescription: 'section-header',\n\t\t\tstickiness: TrackedRangeStickiness.GrowsOnlyWhenTypingAfter,\n\t\t\tcollapseOnReplaceEdit: true,\n\t\t\tminimap: {\n\t\t\t\tcolor: undefined,\n\t\t\t\tposition: MinimapPosition.Inline,\n\t\t\t\tsectionHeaderStyle: sectionHeader.hasSeparatorLine ? MinimapSectionHeaderStyle.Underlined : MinimapSectionHeaderStyle.Normal,\n\t\t\t\tsectionHeaderText: sectionHeader.text,\n\t\t\t},\n\t\t})\n\t};\n}\n\nregisterEditorContribution(SectionHeaderDetector.ID, SectionHeaderDetector, EditorContributionInstantiation.AfterFirstRender);\n"]}
|
|
@@ -131,7 +131,7 @@ class GrowSelectionAction extends AbstractSmartSelect {
|
|
|
131
131
|
constructor() {
|
|
132
132
|
super(true, {
|
|
133
133
|
id: 'editor.action.smartSelect.expand',
|
|
134
|
-
label: nls.localize2(
|
|
134
|
+
label: nls.localize2(1414, "Expand Selection"),
|
|
135
135
|
precondition: undefined,
|
|
136
136
|
kbOpts: {
|
|
137
137
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -145,7 +145,7 @@ class GrowSelectionAction extends AbstractSmartSelect {
|
|
|
145
145
|
menuOpts: {
|
|
146
146
|
menuId: MenuId.MenubarSelectionMenu,
|
|
147
147
|
group: '1_basic',
|
|
148
|
-
title: nls.localize(
|
|
148
|
+
title: nls.localize(1412, "&&Expand Selection"),
|
|
149
149
|
order: 2
|
|
150
150
|
}
|
|
151
151
|
});
|
|
@@ -157,7 +157,7 @@ class ShrinkSelectionAction extends AbstractSmartSelect {
|
|
|
157
157
|
constructor() {
|
|
158
158
|
super(false, {
|
|
159
159
|
id: 'editor.action.smartSelect.shrink',
|
|
160
|
-
label: nls.localize2(
|
|
160
|
+
label: nls.localize2(1415, "Shrink Selection"),
|
|
161
161
|
precondition: undefined,
|
|
162
162
|
kbOpts: {
|
|
163
163
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -171,7 +171,7 @@ class ShrinkSelectionAction extends AbstractSmartSelect {
|
|
|
171
171
|
menuOpts: {
|
|
172
172
|
menuId: MenuId.MenubarSelectionMenu,
|
|
173
173
|
group: '1_basic',
|
|
174
|
-
title: nls.localize(
|
|
174
|
+
title: nls.localize(1413, "&&Shrink Selection"),
|
|
175
175
|
order: 3
|
|
176
176
|
}
|
|
177
177
|
});
|
|
@@ -40,9 +40,9 @@ let SnippetController2 = class SnippetController2 {
|
|
|
40
40
|
static get(editor) {
|
|
41
41
|
return editor.getContribution(SnippetController2_1.ID);
|
|
42
42
|
}
|
|
43
|
-
static { this.InSnippetMode = new RawContextKey('inSnippetMode', false, localize(
|
|
44
|
-
static { this.HasNextTabstop = new RawContextKey('hasNextTabstop', false, localize(
|
|
45
|
-
static { this.HasPrevTabstop = new RawContextKey('hasPrevTabstop', false, localize(
|
|
43
|
+
static { this.InSnippetMode = new RawContextKey('inSnippetMode', false, localize(1416, "Whether the editor in current in snippet mode")); }
|
|
44
|
+
static { this.HasNextTabstop = new RawContextKey('hasNextTabstop', false, localize(1417, "Whether there is a next tab stop when in snippet mode")); }
|
|
45
|
+
static { this.HasPrevTabstop = new RawContextKey('hasPrevTabstop', false, localize(1418, "Whether there is a previous tab stop when in snippet mode")); }
|
|
46
46
|
constructor(_editor, _logService, _languageFeaturesService, contextKeyService, _languageConfigurationService) {
|
|
47
47
|
this._editor = _editor;
|
|
48
48
|
this._logService = _logService;
|
|
@@ -128,7 +128,7 @@ let SnippetController2 = class SnippetController2 {
|
|
|
128
128
|
sortText: 'a'.repeat(i + 1),
|
|
129
129
|
range: activeChoice.range,
|
|
130
130
|
filterText: isAnyOfOptions ? `${word}_${option.value}` : undefined,
|
|
131
|
-
command: { id: 'jumpToNextSnippetPlaceholder', title: localize(
|
|
131
|
+
command: { id: 'jumpToNextSnippetPlaceholder', title: localize(1419, 'Go to next placeholder...') }
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
134
|
return { suggestions };
|
|
@@ -289,6 +289,12 @@ export class FormatString extends Marker {
|
|
|
289
289
|
else if (this.shorthandName === 'camelcase') {
|
|
290
290
|
return !value ? '' : this._toCamelCase(value);
|
|
291
291
|
}
|
|
292
|
+
else if (this.shorthandName === 'kebabcase') {
|
|
293
|
+
return !value ? '' : this._toKebabCase(value);
|
|
294
|
+
}
|
|
295
|
+
else if (this.shorthandName === 'snakecase') {
|
|
296
|
+
return !value ? '' : this._toSnakeCase(value);
|
|
297
|
+
}
|
|
292
298
|
else if (Boolean(value) && typeof this.ifValue === 'string') {
|
|
293
299
|
return this.ifValue;
|
|
294
300
|
}
|
|
@@ -299,6 +305,28 @@ export class FormatString extends Marker {
|
|
|
299
305
|
return value || '';
|
|
300
306
|
}
|
|
301
307
|
}
|
|
308
|
+
_toKebabCase(value) {
|
|
309
|
+
const match = value.match(/[a-z0-9]+/gi);
|
|
310
|
+
if (!match) {
|
|
311
|
+
return value;
|
|
312
|
+
}
|
|
313
|
+
if (!value.match(/[a-z0-9]/)) {
|
|
314
|
+
return value
|
|
315
|
+
.trim()
|
|
316
|
+
.toLowerCase()
|
|
317
|
+
.replace(/^_+|_+$/g, '')
|
|
318
|
+
.replace(/[\s_]+/g, '-');
|
|
319
|
+
}
|
|
320
|
+
const match2 = value
|
|
321
|
+
.trim()
|
|
322
|
+
.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g);
|
|
323
|
+
if (!match2) {
|
|
324
|
+
return value;
|
|
325
|
+
}
|
|
326
|
+
return match2
|
|
327
|
+
.map(x => x.toLowerCase())
|
|
328
|
+
.join('-');
|
|
329
|
+
}
|
|
302
330
|
_toPascalCase(value) {
|
|
303
331
|
const match = value.match(/[a-z0-9]+/gi);
|
|
304
332
|
if (!match) {
|
|
@@ -322,6 +350,11 @@ export class FormatString extends Marker {
|
|
|
322
350
|
})
|
|
323
351
|
.join('');
|
|
324
352
|
}
|
|
353
|
+
_toSnakeCase(value) {
|
|
354
|
+
return value.replace(/([a-z])([A-Z])/g, '$1_$2')
|
|
355
|
+
.replace(/[\s\-]+/g, '_')
|
|
356
|
+
.toLowerCase();
|
|
357
|
+
}
|
|
325
358
|
clone() {
|
|
326
359
|
const ret = new FormatString(this.index, this.shorthandName, this.ifValue, this.elseValue);
|
|
327
360
|
return ret;
|