monaco-editor-core 0.55.0 → 0.56.0-dev-20251121
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 +27 -8
- package/esm/vs/base/browser/dom.js +31 -34
- package/esm/vs/base/browser/dom.js.map +1 -1
- package/esm/vs/base/browser/dompurify/dompurify.js +0 -1
- package/esm/vs/base/browser/keyboardEvent.js +3 -3
- package/esm/vs/base/browser/keyboardEvent.js.map +1 -1
- package/esm/vs/base/browser/markdownRenderer.js +5 -2
- package/esm/vs/base/browser/markdownRenderer.js.map +1 -1
- package/esm/vs/base/browser/pixelRatio.js +5 -5
- package/esm/vs/base/browser/pixelRatio.js.map +1 -1
- package/esm/vs/base/browser/trustedTypes.js +1 -1
- package/esm/vs/base/browser/trustedTypes.js.map +1 -1
- package/esm/vs/base/browser/ui/actionbar/actionbar.js +3 -0
- package/esm/vs/base/browser/ui/actionbar/actionbar.js.map +1 -1
- package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js +7 -0
- package/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js.map +1 -1
- package/esm/vs/base/browser/ui/hover/hoverWidget.css +0 -13
- package/esm/vs/base/browser/ui/inputbox/inputBox.js +7 -0
- package/esm/vs/base/browser/ui/inputbox/inputBox.js.map +1 -1
- package/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css +4 -2
- package/esm/vs/base/browser/ui/list/listView.js +7 -2
- package/esm/vs/base/browser/ui/list/listView.js.map +1 -1
- package/esm/vs/base/browser/ui/selectBox/selectBox.js +4 -0
- package/esm/vs/base/browser/ui/selectBox/selectBox.js.map +1 -1
- package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.css +12 -32
- package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js +8 -18
- package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js.map +1 -1
- package/esm/vs/base/browser/ui/toolbar/toolbar.js +41 -14
- package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/abstractTree.js +11 -0
- package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/asyncDataTree.js +1 -0
- package/esm/vs/base/browser/ui/tree/asyncDataTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/compressedObjectTreeModel.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/dataTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/indexTreeModel.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/objectTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/objectTreeModel.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/tree.js.map +1 -1
- package/esm/vs/base/common/arrays.js +10 -0
- package/esm/vs/base/common/arrays.js.map +1 -1
- package/esm/vs/base/common/async.js +34 -0
- package/esm/vs/base/common/async.js.map +1 -1
- package/esm/vs/base/common/buffer.js +1 -1
- package/esm/vs/base/common/buffer.js.map +1 -1
- package/esm/vs/base/common/cancellation.js.map +1 -1
- package/esm/vs/base/common/codiconsLibrary.js +3 -0
- package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
- package/esm/vs/base/common/collections.js.map +1 -1
- package/esm/vs/base/common/equals.js.map +1 -1
- package/esm/vs/base/common/event.js +32 -15
- package/esm/vs/base/common/event.js.map +1 -1
- package/esm/vs/base/common/filters.js +22 -3
- package/esm/vs/base/common/filters.js.map +1 -1
- package/esm/vs/base/common/hotReload.js +2 -2
- package/esm/vs/base/common/hotReload.js.map +1 -1
- package/esm/vs/base/common/iterator.js +1 -1
- package/esm/vs/base/common/iterator.js.map +1 -1
- package/esm/vs/base/common/keyCodes.js +7 -6
- package/esm/vs/base/common/keyCodes.js.map +1 -1
- package/esm/vs/base/common/linkedList.js.map +1 -1
- package/esm/vs/base/common/map.js.map +1 -1
- package/esm/vs/base/common/marked/marked.js +0 -1
- package/esm/vs/base/common/network.js +26 -1
- package/esm/vs/base/common/network.js.map +1 -1
- package/esm/vs/base/common/normalization.js +19 -6
- package/esm/vs/base/common/normalization.js.map +1 -1
- package/esm/vs/base/common/observableInternal/debugLocation.js +1 -2
- package/esm/vs/base/common/observableInternal/debugLocation.js.map +1 -1
- package/esm/vs/base/common/observableInternal/debugName.js +0 -1
- package/esm/vs/base/common/observableInternal/debugName.js.map +1 -1
- package/esm/vs/base/common/observableInternal/index.js +4 -4
- package/esm/vs/base/common/observableInternal/index.js.map +1 -1
- package/esm/vs/base/common/observableInternal/logging/debugGetDependencyGraph.js +38 -10
- package/esm/vs/base/common/observableInternal/logging/debugGetDependencyGraph.js.map +1 -1
- package/esm/vs/base/common/observableInternal/observables/baseObservable.js +3 -3
- package/esm/vs/base/common/observableInternal/observables/baseObservable.js.map +1 -1
- package/esm/vs/base/common/observableInternal/utils/utils.js +46 -5
- package/esm/vs/base/common/observableInternal/utils/utils.js.map +1 -1
- package/esm/vs/base/common/path.js +1 -0
- package/esm/vs/base/common/path.js.map +1 -1
- package/esm/vs/base/common/strings.js +27 -19
- package/esm/vs/base/common/strings.js.map +1 -1
- package/esm/vs/editor/browser/config/elementSizeObserver.js +5 -5
- package/esm/vs/editor/browser/config/elementSizeObserver.js.map +1 -1
- package/esm/vs/editor/browser/config/fontMeasurements.js.map +1 -1
- package/esm/vs/editor/browser/config/migrateOptions.js +6 -0
- package/esm/vs/editor/browser/config/migrateOptions.js.map +1 -1
- package/esm/vs/editor/browser/config/tabFocus.js +4 -2
- package/esm/vs/editor/browser/config/tabFocus.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +8 -0
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js.map +1 -1
- package/esm/vs/editor/browser/coreCommands.js +1 -2
- package/esm/vs/editor/browser/coreCommands.js.map +1 -1
- package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
- package/esm/vs/editor/browser/observableCodeEditor.js +32 -1
- package/esm/vs/editor/browser/observableCodeEditor.js.map +1 -1
- package/esm/vs/editor/browser/services/contribution.js +9 -0
- package/esm/vs/editor/browser/services/contribution.js.map +1 -0
- package/esm/vs/editor/browser/services/editorWorkerService.js +27 -14
- package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
- package/esm/vs/editor/browser/services/openerService.js +5 -1
- package/esm/vs/editor/browser/services/openerService.js.map +1 -1
- package/esm/vs/editor/browser/view/domLineBreaksComputer.js +1 -1
- package/esm/vs/editor/browser/view/domLineBreaksComputer.js.map +1 -1
- package/esm/vs/editor/browser/view/renderingContext.js +1 -1
- package/esm/vs/editor/browser/view/renderingContext.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js +10 -3
- package/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +3 -4
- package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/minimap/minimap.js +1 -1
- package/esm/vs/editor/browser/viewParts/minimap/minimap.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js +1 -1
- package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js +4 -2
- package/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/rulers/rulers.js +1 -3
- package/esm/vs/editor/browser/viewParts/rulers/rulers.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js +1 -1
- package/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/viewLines/domReadingContext.js +2 -1
- package/esm/vs/editor/browser/viewParts/viewLines/domReadingContext.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/viewLines/viewLines.js +6 -18
- package/esm/vs/editor/browser/viewParts/viewLines/viewLines.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/whitespace/whitespace.js +0 -7
- package/esm/vs/editor/browser/viewParts/whitespace/whitespace.js.map +1 -1
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +7 -2
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +1 -0
- package/esm/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js.map +1 -1
- package/esm/vs/editor/common/commands/replaceCommand.js +2 -2
- package/esm/vs/editor/common/commands/replaceCommand.js.map +1 -1
- package/esm/vs/editor/common/config/editorOptions.js +374 -360
- package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
- package/esm/vs/editor/common/core/2d/rect.js +7 -0
- package/esm/vs/editor/common/core/2d/rect.js.map +1 -1
- package/esm/vs/editor/common/core/2d/size.js +20 -0
- package/esm/vs/editor/common/core/2d/size.js.map +1 -0
- package/esm/vs/editor/common/core/editorColorRegistry.js +69 -68
- package/esm/vs/editor/common/core/editorColorRegistry.js.map +1 -1
- package/esm/vs/editor/common/core/ranges/offsetRange.js +9 -0
- package/esm/vs/editor/common/core/ranges/offsetRange.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/editorContextKeys.js +47 -47
- package/esm/vs/editor/common/languages/modesRegistry.js +1 -1
- package/esm/vs/editor/common/languages.js +56 -56
- package/esm/vs/editor/common/languages.js.map +1 -1
- package/esm/vs/editor/common/model/editStack.js +1 -1
- package/esm/vs/editor/common/services/languagesAssociations.js +6 -8
- package/esm/vs/editor/common/services/languagesAssociations.js.map +1 -1
- package/esm/vs/editor/common/standaloneStrings.js +11 -10
- package/esm/vs/editor/common/standaloneStrings.js.map +1 -1
- package/esm/vs/editor/common/textModelEditSource.js +1 -1
- package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
- package/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
- package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +6 -6
- package/esm/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
- package/esm/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
- package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +17 -17
- package/esm/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
- package/esm/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
- package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
- package/esm/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
- package/esm/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
- package/esm/vs/editor/contrib/codelens/browser/codelens.js.map +1 -1
- package/esm/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
- package/esm/vs/editor/contrib/codelens/browser/codelensController.js.map +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
- package/esm/vs/editor/contrib/comment/browser/comment.js +6 -6
- package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +10 -10
- package/esm/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
- package/esm/vs/editor/contrib/diffEditorBreadcrumbs/browser/contribution.js +14 -0
- package/esm/vs/editor/contrib/diffEditorBreadcrumbs/browser/contribution.js.map +1 -1
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +4 -4
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +9 -9
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +2 -2
- package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
- package/esm/vs/editor/contrib/find/browser/findController.js +17 -17
- package/esm/vs/editor/contrib/find/browser/findController.js.map +1 -1
- package/esm/vs/editor/contrib/find/browser/findWidget.js +26 -26
- package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.css +1 -1
- package/esm/vs/editor/contrib/folding/browser/folding.js +20 -20
- package/esm/vs/editor/contrib/folding/browser/folding.js.map +1 -1
- package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
- package/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
- package/esm/vs/editor/contrib/format/browser/format.js +21 -6
- package/esm/vs/editor/contrib/format/browser/format.js.map +1 -1
- package/esm/vs/editor/contrib/format/browser/formatActions.js +2 -2
- package/esm/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
- package/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
- package/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
- package/esm/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
- package/esm/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
- package/esm/vs/editor/contrib/hover/browser/contentHoverController.js +5 -10
- package/esm/vs/editor/contrib/hover/browser/contentHoverController.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/glyphHoverController.js +11 -6
- package/esm/vs/editor/contrib/hover/browser/glyphHoverController.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
- package/esm/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
- package/esm/vs/editor/contrib/hover/browser/hoverCopyButton.js +2 -2
- package/esm/vs/editor/contrib/hover/browser/hoverUtils.js +24 -0
- package/esm/vs/editor/contrib/hover/browser/hoverUtils.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +9 -9
- package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +5 -5
- package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
- package/esm/vs/editor/contrib/indentation/browser/indentation.js +20 -20
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +20 -20
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +12 -12
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +18 -16
- 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/model/inlineCompletionsModel.js +42 -37
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js +3 -3
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js +8 -8
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +54 -43
- 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 +12 -12
- 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 +74 -48
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +8 -36
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsNewUsers.js +10 -11
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsNewUsers.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +105 -119
- 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.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +8 -36
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/debugVisualization.js +95 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/debugVisualization.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js +17 -9
- 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/longDistanceHint/inlineEditsLongDistanceHint.js +415 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js +253 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -20
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/flexBoxLayout.js +103 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/flexBoxLayout.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/towersLayout.js +32 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/towersLayout.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js +44 -11
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js +181 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js.map +1 -0
- 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 -31
- 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/editorNavigationQuickAccess.js +2 -2
- package/esm/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js.map +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +18 -13
- package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js.map +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
- package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
- package/esm/vs/editor/contrib/rename/browser/rename.js +12 -12
- 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/smartSelect/browser/smartSelect.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +1 -1
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggest.js +8 -8
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js +10 -10
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +17 -17
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
- package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
- package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
- package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +29 -29
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js.map +1 -1
- 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 +4 -4
- package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js.map +1 -1
- package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +1 -1
- package/esm/vs/editor/editor.all.js +1 -0
- package/esm/vs/editor/editor.all.js.map +1 -1
- package/esm/vs/editor/editor.api.d.ts +9 -5
- package/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js +22 -2
- package/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js.map +1 -1
- package/esm/vs/editor/standalone/browser/services/standaloneWebWorkerService.js +39 -0
- package/esm/vs/editor/standalone/browser/services/standaloneWebWorkerService.js.map +1 -0
- package/esm/vs/editor/standalone/browser/standaloneEditor.js +2 -1
- package/esm/vs/editor/standalone/browser/standaloneEditor.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneServices.js +3 -21
- package/esm/vs/editor/standalone/browser/standaloneServices.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneWebWorker.js +4 -4
- package/esm/vs/editor/standalone/browser/standaloneWebWorker.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.js +7 -7
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +7 -9
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js.map +1 -1
- package/esm/vs/platform/actions/browser/toolbar.js +2 -2
- package/esm/vs/platform/actions/common/actions.js +2 -0
- 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/configuration.js +5 -4
- package/esm/vs/platform/configuration/common/configuration.js.map +1 -1
- package/esm/vs/platform/configuration/common/configurationModels.js +21 -10
- package/esm/vs/platform/configuration/common/configurationModels.js.map +1 -1
- package/esm/vs/platform/configuration/common/configurationRegistry.js +10 -10
- package/esm/vs/platform/configuration/common/configurationRegistry.js.map +1 -1
- package/esm/vs/platform/configuration/common/configurations.js.map +1 -1
- package/esm/vs/platform/contextkey/browser/contextKeyService.js +3 -3
- package/esm/vs/platform/contextkey/browser/contextKeyService.js.map +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/contextview/browser/contextViewService.js.map +1 -1
- package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
- package/esm/vs/platform/hover/browser/hoverWidget.js +1 -1
- package/esm/vs/platform/hover/browser/updatableHoverWidget.js +1 -1
- package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
- package/esm/vs/platform/list/browser/listService.js +27 -27
- package/esm/vs/platform/list/browser/listService.js.map +1 -1
- package/esm/vs/platform/markers/common/markerService.js +2 -2
- package/esm/vs/platform/markers/common/markers.js +6 -6
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +11 -32
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
- package/esm/vs/platform/quickinput/browser/media/quickInput.css +9 -3
- package/esm/vs/platform/quickinput/browser/quickInput.js +10 -10
- package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
- package/esm/vs/platform/quickinput/browser/quickInputController.js +35 -14
- package/esm/vs/platform/quickinput/browser/quickInputController.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputList.js +4 -1
- package/esm/vs/platform/quickinput/browser/quickInputList.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeController.js +71 -40
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeController.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js +21 -8
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js.map +1 -1
- package/esm/vs/platform/telemetry/common/gdprTypings.js.map +1 -1
- package/esm/vs/platform/telemetry/common/telemetry.js.map +1 -1
- package/esm/vs/platform/theme/common/colorUtils.js +2 -2
- package/esm/vs/platform/theme/common/colors/baseColors.js +17 -17
- package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
- package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
- package/esm/vs/platform/theme/common/colors/editorColors.js.map +1 -1
- package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
- package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
- package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
- package/esm/vs/platform/theme/common/colors/minimapColors.js +11 -11
- package/esm/vs/platform/theme/common/colors/miscColors.js +16 -16
- package/esm/vs/platform/theme/common/colors/miscColors.js.map +1 -1
- package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
- package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
- package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
- package/esm/vs/platform/undoRedo/common/undoRedoService.js +20 -20
- package/esm/vs/platform/webWorker/browser/webWorkerDescriptor.js +12 -0
- package/esm/vs/platform/webWorker/browser/webWorkerDescriptor.js.map +1 -0
- package/esm/vs/platform/webWorker/browser/webWorkerService.js +7 -0
- package/esm/vs/platform/webWorker/browser/webWorkerService.js.map +1 -0
- package/esm/vs/{base/browser/webWorkerFactory.js → platform/webWorker/browser/webWorkerServiceImpl.js} +47 -66
- package/esm/vs/platform/webWorker/browser/webWorkerServiceImpl.js.map +1 -0
- package/esm/vs/platform/workspace/common/workspace.js +1 -1
- package/monaco.d.ts +9 -5
- package/package.json +2 -2
- package/version.txt +1 -1
- package/esm/vs/base/browser/webWorkerFactory.js.map +0 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineCompletionsView.js +0 -82
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineCompletionsView.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["vs/platform/configuration/common/configurationRegistry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/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 { distinct } from '../../../base/common/arrays.js';\nimport { IStringDictionary } from '../../../base/common/collections.js';\nimport { Emitter } from '../../../base/common/event.js';\nimport { IJSONSchema } from '../../../base/common/jsonSchema.js';\nimport * as types from '../../../base/common/types.js';\nimport * as nls from '../../../nls.js';\nimport { getLanguageTagSettingPlainKey } from './configuration.js';\nimport { Extensions as JSONExtensions, IJSONContributionRegistry } from '../../jsonschemas/common/jsonContributionRegistry.js';\nimport { Registry } from '../../registry/common/platform.js';\nimport { IPolicy, PolicyName } from '../../../base/common/policy.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport product from '../../product/common/product.js';\n\nexport const Extensions = {\n\tConfiguration: 'base.contributions.configuration'\n};\n\nexport interface IConfigurationRegistry {\n\n\t/**\n\t * Register a configuration to the registry.\n\t */\n\tregisterConfiguration(configuration: IConfigurationNode): IConfigurationNode;\n\n\t/**\n\t * Register multiple default configurations to the registry.\n\t */\n\tregisterDefaultConfigurations(defaultConfigurations: IConfigurationDefaults[]): void;\n\n\t/**\n\t * Returns all configurations settings of all configuration nodes contributed to this registry.\n\t */\n\tgetConfigurationProperties(): IStringDictionary<IRegisteredConfigurationPropertySchema>;\n\n\t/**\n\t * Returns all excluded configurations settings of all configuration nodes contributed to this registry.\n\t */\n\tgetExcludedConfigurationProperties(): IStringDictionary<IRegisteredConfigurationPropertySchema>;\n\n\t/**\n\t * Register the identifiers for editor configurations\n\t */\n\tregisterOverrideIdentifiers(identifiers: string[]): void;\n}\n\nexport const enum ConfigurationScope {\n\t/**\n\t * Application specific configuration, which can be configured only in default profile user settings.\n\t */\n\tAPPLICATION = 1,\n\t/**\n\t * Machine specific configuration, which can be configured only in local and remote user settings.\n\t */\n\tMACHINE,\n\t/**\n\t * An application machine specific configuration, which can be configured only in default profile user settings and remote user settings.\n\t */\n\tAPPLICATION_MACHINE,\n\t/**\n\t * Window specific configuration, which can be configured in the user or workspace settings.\n\t */\n\tWINDOW,\n\t/**\n\t * Resource specific configuration, which can be configured in the user, workspace or folder settings.\n\t */\n\tRESOURCE,\n\t/**\n\t * Resource specific configuration that can be configured in language specific settings\n\t */\n\tLANGUAGE_OVERRIDABLE,\n\t/**\n\t * Machine specific configuration that can also be configured in workspace or folder settings.\n\t */\n\tMACHINE_OVERRIDABLE,\n}\n\n\nexport interface IConfigurationPropertySchema extends IJSONSchema {\n\n\tscope?: ConfigurationScope;\n\n\t/**\n\t * When restricted, value of this configuration will be read only from trusted sources.\n\t * For eg., If the workspace is not trusted, then the value of this configuration is not read from workspace settings file.\n\t */\n\trestricted?: boolean;\n\n\t/**\n\t * When `false` this property is excluded from the registry. Default is to include.\n\t */\n\tincluded?: boolean;\n\n\t/**\n\t * List of tags associated to the property.\n\t * - A tag can be used for filtering\n\t * - Use `experimental` tag for marking the setting as experimental.\n\t */\n\ttags?: string[];\n\n\t/**\n\t * Disallow extensions to contribute configuration default value for this setting.\n\t */\n\tdisallowConfigurationDefault?: boolean;\n\n\t/**\n\t * When specified, this setting's value can always be overwritten by\n\t * a system-wide policy.\n\t */\n\tpolicy?: IPolicy;\n\n\t/**\n\t * When specified, this setting's default value can always be overwritten by\n\t * an experiment.\n\t */\n\texperiment?: {\n\t\t/**\n\t\t * The mode of the experiment.\n\t\t * - `startup`: The setting value is updated to the experiment value only on startup.\n\t\t * - `auto`: The setting value is updated to the experiment value automatically (whenever the experiment value changes).\n\t\t */\n\t\tmode: 'startup' | 'auto';\n\n\t\t/**\n\t\t * The name of the experiment. By default, this is `config.${settingId}`\n\t\t */\n\t\tname?: string;\n\t};\n}\n\nexport interface IExtensionInfo {\n\tid: string;\n}\n\nexport interface IConfigurationNode {\n\tid?: string;\n\torder?: number;\n\ttype?: string | string[];\n\ttitle?: string;\n\tproperties?: IStringDictionary<IConfigurationPropertySchema>;\n\tallOf?: IConfigurationNode[];\n\tscope?: ConfigurationScope;\n\textensionInfo?: IExtensionInfo;\n\trestrictedProperties?: string[];\n}\n\nexport type ConfigurationDefaultValueSource = IExtensionInfo | Map<string, IExtensionInfo>;\n\nexport interface IConfigurationDefaults {\n\toverrides: IStringDictionary<any>;\n\tsource?: IExtensionInfo;\n}\n\nexport type IRegisteredConfigurationPropertySchema = IConfigurationPropertySchema & {\n\tsection?: {\n\t\tid?: string;\n\t\ttitle?: string;\n\t\torder?: number;\n\t\textensionInfo?: IExtensionInfo;\n\t};\n\tdefaultDefaultValue?: any;\n\tsource?: IExtensionInfo; // Source of the Property\n\tdefaultValueSource?: ConfigurationDefaultValueSource; // Source of the Default Value\n};\n\nexport interface IConfigurationDefaultOverride {\n\treadonly value: any;\n\treadonly source?: IExtensionInfo; // Source of the default override\n}\n\nexport interface IConfigurationDefaultOverrideValue {\n\treadonly value: any;\n\treadonly source?: ConfigurationDefaultValueSource;\n}\n\nexport const allSettings: { properties: IStringDictionary<IConfigurationPropertySchema>; patternProperties: IStringDictionary<IConfigurationPropertySchema> } = { properties: {}, patternProperties: {} };\nexport const applicationSettings: { properties: IStringDictionary<IConfigurationPropertySchema>; patternProperties: IStringDictionary<IConfigurationPropertySchema> } = { properties: {}, patternProperties: {} };\nexport const applicationMachineSettings: { properties: IStringDictionary<IConfigurationPropertySchema>; patternProperties: IStringDictionary<IConfigurationPropertySchema> } = { properties: {}, patternProperties: {} };\nexport const machineSettings: { properties: IStringDictionary<IConfigurationPropertySchema>; patternProperties: IStringDictionary<IConfigurationPropertySchema> } = { properties: {}, patternProperties: {} };\nexport const machineOverridableSettings: { properties: IStringDictionary<IConfigurationPropertySchema>; patternProperties: IStringDictionary<IConfigurationPropertySchema> } = { properties: {}, patternProperties: {} };\nexport const windowSettings: { properties: IStringDictionary<IConfigurationPropertySchema>; patternProperties: IStringDictionary<IConfigurationPropertySchema> } = { properties: {}, patternProperties: {} };\nexport const resourceSettings: { properties: IStringDictionary<IConfigurationPropertySchema>; patternProperties: IStringDictionary<IConfigurationPropertySchema> } = { properties: {}, patternProperties: {} };\n\nexport const resourceLanguageSettingsSchemaId = 'vscode://schemas/settings/resourceLanguage';\n\nconst contributionRegistry = Registry.as<IJSONContributionRegistry>(JSONExtensions.JSONContribution);\n\nclass ConfigurationRegistry extends Disposable implements IConfigurationRegistry {\n\n\tprivate readonly registeredConfigurationDefaults: IConfigurationDefaults[] = [];\n\tprivate readonly configurationDefaultsOverrides: Map<string, { configurationDefaultOverrides: IConfigurationDefaultOverride[]; configurationDefaultOverrideValue?: IConfigurationDefaultOverrideValue }>;\n\tprivate readonly defaultLanguageConfigurationOverridesNode: IConfigurationNode;\n\tprivate readonly configurationContributors: IConfigurationNode[];\n\tprivate readonly configurationProperties: IStringDictionary<IRegisteredConfigurationPropertySchema>;\n\tprivate readonly policyConfigurations: Map<PolicyName, string>;\n\tprivate readonly excludedConfigurationProperties: IStringDictionary<IRegisteredConfigurationPropertySchema>;\n\tprivate readonly resourceLanguageSettingsSchema: IJSONSchema;\n\tprivate readonly overrideIdentifiers = new Set<string>();\n\n\tprivate readonly _onDidSchemaChange = this._register(new Emitter<void>());\n\n\tprivate readonly _onDidUpdateConfiguration = this._register(new Emitter<{ properties: ReadonlySet<string>; defaultsOverrides?: boolean }>());\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis.configurationDefaultsOverrides = new Map();\n\t\tthis.defaultLanguageConfigurationOverridesNode = {\n\t\t\tid: 'defaultOverrides',\n\t\t\ttitle: nls.localize('defaultLanguageConfigurationOverrides.title', \"Default Language Configuration Overrides\"),\n\t\t\tproperties: {}\n\t\t};\n\t\tthis.configurationContributors = [this.defaultLanguageConfigurationOverridesNode];\n\t\tthis.resourceLanguageSettingsSchema = {\n\t\t\tproperties: {},\n\t\t\tpatternProperties: {},\n\t\t\tadditionalProperties: true,\n\t\t\tallowTrailingCommas: true,\n\t\t\tallowComments: true\n\t\t};\n\t\tthis.configurationProperties = {};\n\t\tthis.policyConfigurations = new Map<PolicyName, string>();\n\t\tthis.excludedConfigurationProperties = {};\n\n\t\tcontributionRegistry.registerSchema(resourceLanguageSettingsSchemaId, this.resourceLanguageSettingsSchema);\n\t\tthis.registerOverridePropertyPatternKey();\n\t}\n\n\tpublic registerConfiguration(configuration: IConfigurationNode, validate: boolean = true): IConfigurationNode {\n\t\tthis.registerConfigurations([configuration], validate);\n\t\treturn configuration;\n\t}\n\n\tpublic registerConfigurations(configurations: IConfigurationNode[], validate: boolean = true): void {\n\t\tconst properties = new Set<string>();\n\t\tthis.doRegisterConfigurations(configurations, validate, properties);\n\n\t\tcontributionRegistry.registerSchema(resourceLanguageSettingsSchemaId, this.resourceLanguageSettingsSchema);\n\t\tthis._onDidSchemaChange.fire();\n\t\tthis._onDidUpdateConfiguration.fire({ properties });\n\t}\n\n\tpublic registerDefaultConfigurations(configurationDefaults: IConfigurationDefaults[]): void {\n\t\tconst properties = new Set<string>();\n\t\tthis.doRegisterDefaultConfigurations(configurationDefaults, properties);\n\t\tthis._onDidSchemaChange.fire();\n\t\tthis._onDidUpdateConfiguration.fire({ properties, defaultsOverrides: true });\n\t}\n\n\tprivate doRegisterDefaultConfigurations(configurationDefaults: IConfigurationDefaults[], bucket: Set<string>) {\n\n\t\tthis.registeredConfigurationDefaults.push(...configurationDefaults);\n\n\t\tconst overrideIdentifiers: string[] = [];\n\n\t\tfor (const { overrides, source } of configurationDefaults) {\n\t\t\tfor (const key in overrides) {\n\t\t\t\tbucket.add(key);\n\n\t\t\t\tconst configurationDefaultOverridesForKey = this.configurationDefaultsOverrides.get(key)\n\t\t\t\t\t?? this.configurationDefaultsOverrides.set(key, { configurationDefaultOverrides: [] }).get(key)!;\n\n\t\t\t\tconst value = overrides[key];\n\t\t\t\tconfigurationDefaultOverridesForKey.configurationDefaultOverrides.push({ value, source });\n\n\t\t\t\t// Configuration defaults for Override Identifiers\n\t\t\t\tif (OVERRIDE_PROPERTY_REGEX.test(key)) {\n\t\t\t\t\tconst newDefaultOverride = this.mergeDefaultConfigurationsForOverrideIdentifier(key, value, source, configurationDefaultOverridesForKey.configurationDefaultOverrideValue);\n\t\t\t\t\tif (!newDefaultOverride) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tconfigurationDefaultOverridesForKey.configurationDefaultOverrideValue = newDefaultOverride;\n\t\t\t\t\tthis.updateDefaultOverrideProperty(key, newDefaultOverride, source);\n\t\t\t\t\toverrideIdentifiers.push(...overrideIdentifiersFromKey(key));\n\t\t\t\t}\n\n\t\t\t\t// Configuration defaults for Configuration Properties\n\t\t\t\telse {\n\t\t\t\t\tconst newDefaultOverride = this.mergeDefaultConfigurationsForConfigurationProperty(key, value, source, configurationDefaultOverridesForKey.configurationDefaultOverrideValue);\n\t\t\t\t\tif (!newDefaultOverride) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tconfigurationDefaultOverridesForKey.configurationDefaultOverrideValue = newDefaultOverride;\n\t\t\t\t\tconst property = this.configurationProperties[key];\n\t\t\t\t\tif (property) {\n\t\t\t\t\t\tthis.updatePropertyDefaultValue(key, property);\n\t\t\t\t\t\tthis.updateSchema(key, property);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\tthis.doRegisterOverrideIdentifiers(overrideIdentifiers);\n\t}\n\n\tprivate updateDefaultOverrideProperty(key: string, newDefaultOverride: IConfigurationDefaultOverrideValue, source: IExtensionInfo | undefined): void {\n\t\tconst property: IRegisteredConfigurationPropertySchema = {\n\t\t\tsection: {\n\t\t\t\tid: this.defaultLanguageConfigurationOverridesNode.id,\n\t\t\t\ttitle: this.defaultLanguageConfigurationOverridesNode.title,\n\t\t\t\torder: this.defaultLanguageConfigurationOverridesNode.order,\n\t\t\t\textensionInfo: this.defaultLanguageConfigurationOverridesNode.extensionInfo\n\t\t\t},\n\t\t\ttype: 'object',\n\t\t\tdefault: newDefaultOverride.value,\n\t\t\tdescription: nls.localize('defaultLanguageConfiguration.description', \"Configure settings to be overridden for {0}.\", getLanguageTagSettingPlainKey(key)),\n\t\t\t$ref: resourceLanguageSettingsSchemaId,\n\t\t\tdefaultDefaultValue: newDefaultOverride.value,\n\t\t\tsource,\n\t\t\tdefaultValueSource: source\n\t\t};\n\t\tthis.configurationProperties[key] = property;\n\t\tthis.defaultLanguageConfigurationOverridesNode.properties![key] = property;\n\t}\n\n\tprivate mergeDefaultConfigurationsForOverrideIdentifier(overrideIdentifier: string, configurationValueObject: IStringDictionary<any>, valueSource: IExtensionInfo | undefined, existingDefaultOverride: IConfigurationDefaultOverrideValue | undefined): IConfigurationDefaultOverrideValue | undefined {\n\t\tconst defaultValue = existingDefaultOverride?.value || {};\n\t\tconst source = existingDefaultOverride?.source ?? new Map<string, IExtensionInfo>();\n\n\t\t// This should not happen\n\t\tif (!(source instanceof Map)) {\n\t\t\tconsole.error('objectConfigurationSources is not a Map');\n\t\t\treturn undefined;\n\t\t}\n\n\t\tfor (const propertyKey of Object.keys(configurationValueObject)) {\n\t\t\tconst propertyDefaultValue = configurationValueObject[propertyKey];\n\n\t\t\tconst isObjectSetting = types.isObject(propertyDefaultValue) &&\n\t\t\t\t(types.isUndefined(defaultValue[propertyKey]) || types.isObject(defaultValue[propertyKey]));\n\n\t\t\t// If the default value is an object, merge the objects and store the source of each keys\n\t\t\tif (isObjectSetting) {\n\t\t\t\tdefaultValue[propertyKey] = { ...(defaultValue[propertyKey] ?? {}), ...propertyDefaultValue };\n\t\t\t\t// Track the source of each value in the object\n\t\t\t\tif (valueSource) {\n\t\t\t\t\tfor (const objectKey in propertyDefaultValue) {\n\t\t\t\t\t\tsource.set(`${propertyKey}.${objectKey}`, valueSource);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Primitive values are overridden\n\t\t\telse {\n\t\t\t\tdefaultValue[propertyKey] = propertyDefaultValue;\n\t\t\t\tif (valueSource) {\n\t\t\t\t\tsource.set(propertyKey, valueSource);\n\t\t\t\t} else {\n\t\t\t\t\tsource.delete(propertyKey);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn { value: defaultValue, source };\n\t}\n\n\tprivate mergeDefaultConfigurationsForConfigurationProperty(propertyKey: string, value: any, valuesSource: IExtensionInfo | undefined, existingDefaultOverride: IConfigurationDefaultOverrideValue | undefined): IConfigurationDefaultOverrideValue | undefined {\n\t\tconst property = this.configurationProperties[propertyKey];\n\t\tconst existingDefaultValue = existingDefaultOverride?.value ?? property?.defaultDefaultValue;\n\t\tlet source: ConfigurationDefaultValueSource | undefined = valuesSource;\n\n\t\tconst isObjectSetting = types.isObject(value) &&\n\t\t\t(\n\t\t\t\tproperty !== undefined && property.type === 'object' ||\n\t\t\t\tproperty === undefined && (types.isUndefined(existingDefaultValue) || types.isObject(existingDefaultValue))\n\t\t\t);\n\n\t\t// If the default value is an object, merge the objects and store the source of each keys\n\t\tif (isObjectSetting) {\n\t\t\tsource = existingDefaultOverride?.source ?? new Map<string, IExtensionInfo>();\n\n\t\t\t// This should not happen\n\t\t\tif (!(source instanceof Map)) {\n\t\t\t\tconsole.error('defaultValueSource is not a Map');\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tfor (const objectKey in value) {\n\t\t\t\tif (valuesSource) {\n\t\t\t\t\tsource.set(`${propertyKey}.${objectKey}`, valuesSource);\n\t\t\t\t}\n\t\t\t}\n\t\t\tvalue = { ...(types.isObject(existingDefaultValue) ? existingDefaultValue : {}), ...value };\n\t\t}\n\n\t\treturn { value, source };\n\t}\n\n\tpublic registerOverrideIdentifiers(overrideIdentifiers: string[]): void {\n\t\tthis.doRegisterOverrideIdentifiers(overrideIdentifiers);\n\t\tthis._onDidSchemaChange.fire();\n\t}\n\n\tprivate doRegisterOverrideIdentifiers(overrideIdentifiers: string[]) {\n\t\tfor (const overrideIdentifier of overrideIdentifiers) {\n\t\t\tthis.overrideIdentifiers.add(overrideIdentifier);\n\t\t}\n\t\tthis.updateOverridePropertyPatternKey();\n\t}\n\n\tprivate doRegisterConfigurations(configurations: IConfigurationNode[], validate: boolean, bucket: Set<string>): void {\n\n\t\tconfigurations.forEach(configuration => {\n\n\t\t\tthis.validateAndRegisterProperties(configuration, validate, configuration.extensionInfo, configuration.restrictedProperties, undefined, bucket);\n\n\t\t\tthis.configurationContributors.push(configuration);\n\t\t\tthis.registerJSONConfiguration(configuration);\n\t\t});\n\t}\n\n\tprivate validateAndRegisterProperties(configuration: IConfigurationNode, validate: boolean = true, extensionInfo: IExtensionInfo | undefined, restrictedProperties: string[] | undefined, scope: ConfigurationScope = ConfigurationScope.WINDOW, bucket: Set<string>): void {\n\t\tscope = types.isUndefinedOrNull(configuration.scope) ? scope : configuration.scope;\n\t\tconst properties = configuration.properties;\n\t\tif (properties) {\n\t\t\tfor (const key in properties) {\n\t\t\t\tconst property: IRegisteredConfigurationPropertySchema = properties[key];\n\t\t\t\tproperty.section = {\n\t\t\t\t\tid: configuration.id,\n\t\t\t\t\ttitle: configuration.title,\n\t\t\t\t\torder: configuration.order,\n\t\t\t\t\textensionInfo: configuration.extensionInfo\n\t\t\t\t};\n\t\t\t\tif (validate && validateProperty(key, property, extensionInfo?.id)) {\n\t\t\t\t\tdelete properties[key];\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tproperty.source = extensionInfo;\n\n\t\t\t\t// update default value\n\t\t\t\tproperty.defaultDefaultValue = properties[key].default;\n\t\t\t\tthis.updatePropertyDefaultValue(key, property);\n\n\t\t\t\t// update scope\n\t\t\t\tif (OVERRIDE_PROPERTY_REGEX.test(key)) {\n\t\t\t\t\tproperty.scope = undefined; // No scope for overridable properties `[${identifier}]`\n\t\t\t\t} else {\n\t\t\t\t\tproperty.scope = types.isUndefinedOrNull(property.scope) ? scope : property.scope;\n\t\t\t\t\tproperty.restricted = types.isUndefinedOrNull(property.restricted) ? !!restrictedProperties?.includes(key) : property.restricted;\n\t\t\t\t}\n\n\t\t\t\tif (property.experiment) {\n\t\t\t\t\tif (!property.tags?.some(tag => tag.toLowerCase() === 'onexp')) {\n\t\t\t\t\t\tproperty.tags = property.tags ?? [];\n\t\t\t\t\t\tproperty.tags.push('onExP');\n\t\t\t\t\t}\n\t\t\t\t} else if (property.tags?.some(tag => tag.toLowerCase() === 'onexp')) {\n\t\t\t\t\tconsole.error(`Invalid tag 'onExP' found for property '${key}'. Please use 'experiment' property instead.`);\n\t\t\t\t\tproperty.experiment = { mode: 'startup' };\n\t\t\t\t}\n\n\t\t\t\tconst excluded = properties[key].hasOwnProperty('included') && !properties[key].included;\n\t\t\t\tconst policyName = properties[key].policy?.name;\n\n\t\t\t\tif (excluded) {\n\t\t\t\t\tthis.excludedConfigurationProperties[key] = properties[key];\n\t\t\t\t\tif (policyName) {\n\t\t\t\t\t\tthis.policyConfigurations.set(policyName, key);\n\t\t\t\t\t\tbucket.add(key);\n\t\t\t\t\t}\n\t\t\t\t\tdelete properties[key];\n\t\t\t\t} else {\n\t\t\t\t\tbucket.add(key);\n\t\t\t\t\tif (policyName) {\n\t\t\t\t\t\tthis.policyConfigurations.set(policyName, key);\n\t\t\t\t\t}\n\t\t\t\t\tthis.configurationProperties[key] = properties[key];\n\t\t\t\t\tif (!properties[key].deprecationMessage && properties[key].markdownDeprecationMessage) {\n\t\t\t\t\t\t// If not set, default deprecationMessage to the markdown source\n\t\t\t\t\t\tproperties[key].deprecationMessage = properties[key].markdownDeprecationMessage;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t}\n\t\t}\n\t\tconst subNodes = configuration.allOf;\n\t\tif (subNodes) {\n\t\t\tfor (const node of subNodes) {\n\t\t\t\tthis.validateAndRegisterProperties(node, validate, extensionInfo, restrictedProperties, scope, bucket);\n\t\t\t}\n\t\t}\n\t}\n\n\tgetConfigurationProperties(): IStringDictionary<IRegisteredConfigurationPropertySchema> {\n\t\treturn this.configurationProperties;\n\t}\n\n\tgetPolicyConfigurations(): Map<PolicyName, string> {\n\t\treturn this.policyConfigurations;\n\t}\n\n\tgetExcludedConfigurationProperties(): IStringDictionary<IRegisteredConfigurationPropertySchema> {\n\t\treturn this.excludedConfigurationProperties;\n\t}\n\n\tprivate registerJSONConfiguration(configuration: IConfigurationNode) {\n\t\tconst register = (configuration: IConfigurationNode) => {\n\t\t\tconst properties = configuration.properties;\n\t\t\tif (properties) {\n\t\t\t\tfor (const key in properties) {\n\t\t\t\t\tthis.updateSchema(key, properties[key]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst subNodes = configuration.allOf;\n\t\t\tsubNodes?.forEach(register);\n\t\t};\n\t\tregister(configuration);\n\t}\n\n\tprivate updateSchema(key: string, property: IConfigurationPropertySchema): void {\n\t\tallSettings.properties[key] = property;\n\t\tswitch (property.scope) {\n\t\t\tcase ConfigurationScope.APPLICATION:\n\t\t\t\tapplicationSettings.properties[key] = property;\n\t\t\t\tbreak;\n\t\t\tcase ConfigurationScope.MACHINE:\n\t\t\t\tmachineSettings.properties[key] = property;\n\t\t\t\tbreak;\n\t\t\tcase ConfigurationScope.APPLICATION_MACHINE:\n\t\t\t\tapplicationMachineSettings.properties[key] = property;\n\t\t\t\tbreak;\n\t\t\tcase ConfigurationScope.MACHINE_OVERRIDABLE:\n\t\t\t\tmachineOverridableSettings.properties[key] = property;\n\t\t\t\tbreak;\n\t\t\tcase ConfigurationScope.WINDOW:\n\t\t\t\twindowSettings.properties[key] = property;\n\t\t\t\tbreak;\n\t\t\tcase ConfigurationScope.RESOURCE:\n\t\t\t\tresourceSettings.properties[key] = property;\n\t\t\t\tbreak;\n\t\t\tcase ConfigurationScope.LANGUAGE_OVERRIDABLE:\n\t\t\t\tresourceSettings.properties[key] = property;\n\t\t\t\tthis.resourceLanguageSettingsSchema.properties![key] = property;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tprivate updateOverridePropertyPatternKey(): void {\n\t\tfor (const overrideIdentifier of this.overrideIdentifiers.values()) {\n\t\t\tconst overrideIdentifierProperty = `[${overrideIdentifier}]`;\n\t\t\tconst resourceLanguagePropertiesSchema: IJSONSchema = {\n\t\t\t\ttype: 'object',\n\t\t\t\tdescription: nls.localize('overrideSettings.defaultDescription', \"Configure editor settings to be overridden for a language.\"),\n\t\t\t\terrorMessage: nls.localize('overrideSettings.errorMessage', \"This setting does not support per-language configuration.\"),\n\t\t\t\t$ref: resourceLanguageSettingsSchemaId,\n\t\t\t};\n\t\t\tthis.updatePropertyDefaultValue(overrideIdentifierProperty, resourceLanguagePropertiesSchema);\n\t\t\tallSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n\t\t\tapplicationSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n\t\t\tapplicationMachineSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n\t\t\tmachineSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n\t\t\tmachineOverridableSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n\t\t\twindowSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n\t\t\tresourceSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n\t\t}\n\t}\n\n\tprivate registerOverridePropertyPatternKey(): void {\n\t\tconst resourceLanguagePropertiesSchema: IJSONSchema = {\n\t\t\ttype: 'object',\n\t\t\tdescription: nls.localize('overrideSettings.defaultDescription', \"Configure editor settings to be overridden for a language.\"),\n\t\t\terrorMessage: nls.localize('overrideSettings.errorMessage', \"This setting does not support per-language configuration.\"),\n\t\t\t$ref: resourceLanguageSettingsSchemaId,\n\t\t};\n\t\tallSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n\t\tapplicationSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n\t\tapplicationMachineSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n\t\tmachineSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n\t\tmachineOverridableSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n\t\twindowSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n\t\tresourceSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n\t\tthis._onDidSchemaChange.fire();\n\t}\n\n\tprivate updatePropertyDefaultValue(key: string, property: IRegisteredConfigurationPropertySchema): void {\n\t\tconst configurationdefaultOverride = this.configurationDefaultsOverrides.get(key)?.configurationDefaultOverrideValue;\n\t\tlet defaultValue = undefined;\n\t\tlet defaultSource = undefined;\n\t\tif (configurationdefaultOverride\n\t\t\t&& (!property.disallowConfigurationDefault || !configurationdefaultOverride.source) // Prevent overriding the default value if the property is disallowed to be overridden by configuration defaults from extensions\n\t\t) {\n\t\t\tdefaultValue = configurationdefaultOverride.value;\n\t\t\tdefaultSource = configurationdefaultOverride.source;\n\t\t}\n\t\tif (types.isUndefined(defaultValue)) {\n\t\t\tdefaultValue = property.defaultDefaultValue;\n\t\t\tdefaultSource = undefined;\n\t\t}\n\t\tif (types.isUndefined(defaultValue)) {\n\t\t\tdefaultValue = getDefaultValue(property.type);\n\t\t}\n\t\tproperty.default = defaultValue;\n\t\tproperty.defaultValueSource = defaultSource;\n\t}\n}\n\nconst OVERRIDE_IDENTIFIER_PATTERN = `\\\\[([^\\\\]]+)\\\\]`;\nconst OVERRIDE_IDENTIFIER_REGEX = new RegExp(OVERRIDE_IDENTIFIER_PATTERN, 'g');\nexport const OVERRIDE_PROPERTY_PATTERN = `^(${OVERRIDE_IDENTIFIER_PATTERN})+$`;\nexport const OVERRIDE_PROPERTY_REGEX = new RegExp(OVERRIDE_PROPERTY_PATTERN);\n\nexport function overrideIdentifiersFromKey(key: string): string[] {\n\tconst identifiers: string[] = [];\n\tif (OVERRIDE_PROPERTY_REGEX.test(key)) {\n\t\tlet matches = OVERRIDE_IDENTIFIER_REGEX.exec(key);\n\t\twhile (matches?.length) {\n\t\t\tconst identifier = matches[1].trim();\n\t\t\tif (identifier) {\n\t\t\t\tidentifiers.push(identifier);\n\t\t\t}\n\t\t\tmatches = OVERRIDE_IDENTIFIER_REGEX.exec(key);\n\t\t}\n\t}\n\treturn distinct(identifiers);\n}\n\nexport function getDefaultValue(type: string | string[] | undefined) {\n\tconst t = Array.isArray(type) ? type[0] : <string>type;\n\tswitch (t) {\n\t\tcase 'boolean':\n\t\t\treturn false;\n\t\tcase 'integer':\n\t\tcase 'number':\n\t\t\treturn 0;\n\t\tcase 'string':\n\t\t\treturn '';\n\t\tcase 'array':\n\t\t\treturn [];\n\t\tcase 'object':\n\t\t\treturn {};\n\t\tdefault:\n\t\t\treturn null;\n\t}\n}\n\nconst configurationRegistry = new ConfigurationRegistry();\nRegistry.add(Extensions.Configuration, configurationRegistry);\n\nexport function validateProperty(property: string, schema: IRegisteredConfigurationPropertySchema, extensionId?: string): string | null {\n\tif (!property.trim()) {\n\t\treturn nls.localize('config.property.empty', \"Cannot register an empty property\");\n\t}\n\tif (OVERRIDE_PROPERTY_REGEX.test(property)) {\n\t\treturn nls.localize('config.property.languageDefault', \"Cannot register '{0}'. This matches property pattern '\\\\\\\\[.*\\\\\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.\", property);\n\t}\n\tif (configurationRegistry.getConfigurationProperties()[property] !== undefined && (!extensionId || !EXTENSION_UNIFICATION_EXTENSION_IDS.has(extensionId.toLowerCase()))) {\n\t\treturn nls.localize('config.property.duplicate', \"Cannot register '{0}'. This property is already registered.\", property);\n\t}\n\tif (schema.policy?.name && configurationRegistry.getPolicyConfigurations().get(schema.policy?.name) !== undefined) {\n\t\treturn nls.localize('config.policy.duplicate', \"Cannot register '{0}'. The associated policy {1} is already registered with {2}.\", property, schema.policy?.name, configurationRegistry.getPolicyConfigurations().get(schema.policy?.name));\n\t}\n\treturn null;\n}\n\n// Used for extension unification. Should be removed when complete.\nexport const EXTENSION_UNIFICATION_EXTENSION_IDS: Set<string> = new Set(product.defaultChatAgent ? [product.defaultChatAgent.extensionId, product.defaultChatAgent.chatExtensionId].map(id => id.toLowerCase()) : []);\n"]}
|
|
1
|
+
{"version":3,"sources":["vs/platform/configuration/common/configurationRegistry.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAE1D,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAExD,OAAO,KAAK,KAAK,MAAM,+BAA+B,CAAC;AACvD,OAAO,KAAK,GAAG,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,UAAU,IAAI,cAAc,EAA6B,MAAM,sDAAsD,CAAC;AAC/H,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAE7D,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,OAAO,MAAM,iCAAiC,CAAC;AAEtD,MAAM,CAAC,MAAM,UAAU,GAAG;IACzB,aAAa,EAAE,kCAAkC;CACjD,CAAC;AA+JF,MAAM,CAAC,MAAM,WAAW,GAAwI,EAAE,UAAU,EAAE,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE,CAAC;AAC1M,MAAM,CAAC,MAAM,mBAAmB,GAAwI,EAAE,UAAU,EAAE,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE,CAAC;AAClN,MAAM,CAAC,MAAM,0BAA0B,GAAwI,EAAE,UAAU,EAAE,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE,CAAC;AACzN,MAAM,CAAC,MAAM,eAAe,GAAwI,EAAE,UAAU,EAAE,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE,CAAC;AAC9M,MAAM,CAAC,MAAM,0BAA0B,GAAwI,EAAE,UAAU,EAAE,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE,CAA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AC,eAAe,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC","file":"configurationRegistry.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 { distinct } from '../../../base/common/arrays.js';\nimport { IStringDictionary } from '../../../base/common/collections.js';\nimport { Emitter } from '../../../base/common/event.js';\nimport { IJSONSchema } from '../../../base/common/jsonSchema.js';\nimport * as types from '../../../base/common/types.js';\nimport * as nls from '../../../nls.js';\nimport { getLanguageTagSettingPlainKey } from './configuration.js';\nimport { Extensions as JSONExtensions, IJSONContributionRegistry } from '../../jsonschemas/common/jsonContributionRegistry.js';\nimport { Registry } from '../../registry/common/platform.js';\nimport { IPolicy, PolicyName } from '../../../base/common/policy.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport product from '../../product/common/product.js';\n\nexport const Extensions = {\n\tConfiguration: 'base.contributions.configuration'\n};\n\nexport interface IConfigurationRegistry {\n\n\t/**\n\t * Register a configuration to the registry.\n\t */\n\tregisterConfiguration(configuration: IConfigurationNode): IConfigurationNode;\n\n\t/**\n\t * Register multiple default configurations to the registry.\n\t */\n\tregisterDefaultConfigurations(defaultConfigurations: IConfigurationDefaults[]): void;\n\n\t/**\n\t * Returns all configurations settings of all configuration nodes contributed to this registry.\n\t */\n\tgetConfigurationProperties(): IStringDictionary<IRegisteredConfigurationPropertySchema>;\n\n\t/**\n\t * Returns all excluded configurations settings of all configuration nodes contributed to this registry.\n\t */\n\tgetExcludedConfigurationProperties(): IStringDictionary<IRegisteredConfigurationPropertySchema>;\n\n\t/**\n\t * Register the identifiers for editor configurations\n\t */\n\tregisterOverrideIdentifiers(identifiers: string[]): void;\n}\n\nexport const enum ConfigurationScope {\n\t/**\n\t * Application specific configuration, which can be configured only in default profile user settings.\n\t */\n\tAPPLICATION = 1,\n\t/**\n\t * Machine specific configuration, which can be configured only in local and remote user settings.\n\t */\n\tMACHINE,\n\t/**\n\t * An application machine specific configuration, which can be configured only in default profile user settings and remote user settings.\n\t */\n\tAPPLICATION_MACHINE,\n\t/**\n\t * Window specific configuration, which can be configured in the user or workspace settings.\n\t */\n\tWINDOW,\n\t/**\n\t * Resource specific configuration, which can be configured in the user, workspace or folder settings.\n\t */\n\tRESOURCE,\n\t/**\n\t * Resource specific configuration that can be configured in language specific settings\n\t */\n\tLANGUAGE_OVERRIDABLE,\n\t/**\n\t * Machine specific configuration that can also be configured in workspace or folder settings.\n\t */\n\tMACHINE_OVERRIDABLE,\n}\n\n\nexport interface IConfigurationPropertySchema extends IJSONSchema {\n\n\tscope?: ConfigurationScope;\n\n\t/**\n\t * When restricted, value of this configuration will be read only from trusted sources.\n\t * For eg., If the workspace is not trusted, then the value of this configuration is not read from workspace settings file.\n\t */\n\trestricted?: boolean;\n\n\t/**\n\t * When `false` this property is excluded from the registry. Default is to include.\n\t */\n\tincluded?: boolean;\n\n\t/**\n\t * List of tags associated to the property.\n\t * - A tag can be used for filtering\n\t * - Use `experimental` tag for marking the setting as experimental.\n\t */\n\ttags?: string[];\n\n\t/**\n\t * Disallow extensions to contribute configuration default value for this setting.\n\t */\n\tdisallowConfigurationDefault?: boolean;\n\n\t/**\n\t * When specified, this setting's value can always be overwritten by\n\t * a system-wide policy.\n\t */\n\tpolicy?: IPolicy;\n\n\t/**\n\t * When specified, this setting's default value can always be overwritten by\n\t * an experiment.\n\t */\n\texperiment?: {\n\t\t/**\n\t\t * The mode of the experiment.\n\t\t * - `startup`: The setting value is updated to the experiment value only on startup.\n\t\t * - `auto`: The setting value is updated to the experiment value automatically (whenever the experiment value changes).\n\t\t */\n\t\tmode: 'startup' | 'auto';\n\n\t\t/**\n\t\t * The name of the experiment. By default, this is `config.${settingId}`\n\t\t */\n\t\tname?: string;\n\t};\n}\n\nexport interface IExtensionInfo {\n\tid: string;\n}\n\nexport interface IConfigurationNode {\n\tid?: string;\n\torder?: number;\n\ttype?: string | string[];\n\ttitle?: string;\n\tproperties?: IStringDictionary<IConfigurationPropertySchema>;\n\tallOf?: IConfigurationNode[];\n\tscope?: ConfigurationScope;\n\textensionInfo?: IExtensionInfo;\n\trestrictedProperties?: string[];\n}\n\nexport type ConfigurationDefaultValueSource = IExtensionInfo | Map<string, IExtensionInfo>;\n\nexport interface IConfigurationDefaults {\n\toverrides: IStringDictionary<unknown>;\n\tsource?: IExtensionInfo;\n}\n\nexport type IRegisteredConfigurationPropertySchema = IConfigurationPropertySchema & {\n\tsection?: {\n\t\tid?: string;\n\t\ttitle?: string;\n\t\torder?: number;\n\t\textensionInfo?: IExtensionInfo;\n\t};\n\tdefaultDefaultValue?: unknown;\n\tsource?: IExtensionInfo; // Source of the Property\n\tdefaultValueSource?: ConfigurationDefaultValueSource; // Source of the Default Value\n};\n\nexport interface IConfigurationDefaultOverride {\n\treadonly value: unknown;\n\treadonly source?: IExtensionInfo; // Source of the default override\n}\n\nexport interface IConfigurationDefaultOverrideValue {\n\treadonly value: unknown;\n\treadonly source?: ConfigurationDefaultValueSource;\n}\n\nexport const allSettings: { properties: IStringDictionary<IConfigurationPropertySchema>; patternProperties: IStringDictionary<IConfigurationPropertySchema> } = { properties: {}, patternProperties: {} };\nexport const applicationSettings: { properties: IStringDictionary<IConfigurationPropertySchema>; patternProperties: IStringDictionary<IConfigurationPropertySchema> } = { properties: {}, patternProperties: {} };\nexport const applicationMachineSettings: { properties: IStringDictionary<IConfigurationPropertySchema>; patternProperties: IStringDictionary<IConfigurationPropertySchema> } = { properties: {}, patternProperties: {} };\nexport const machineSettings: { properties: IStringDictionary<IConfigurationPropertySchema>; patternProperties: IStringDictionary<IConfigurationPropertySchema> } = { properties: {}, patternProperties: {} };\nexport const machineOverridableSettings: { properties: IStringDictionary<IConfigurationPropertySchema>; patternProperties: IStringDictionary<IConfigurationPropertySchema> } = { properties: {}, patternProperties: {} };\nexport const windowSettings: { properties: IStringDictionary<IConfigurationPropertySchema>; patternProperties: IStringDictionary<IConfigurationPropertySchema> } = { properties: {}, patternProperties: {} };\nexport const resourceSettings: { properties: IStringDictionary<IConfigurationPropertySchema>; patternProperties: IStringDictionary<IConfigurationPropertySchema> } = { properties: {}, patternProperties: {} };\n\nexport const resourceLanguageSettingsSchemaId = 'vscode://schemas/settings/resourceLanguage';\n\nconst contributionRegistry = Registry.as<IJSONContributionRegistry>(JSONExtensions.JSONContribution);\n\nclass ConfigurationRegistry extends Disposable implements IConfigurationRegistry {\n\n\tprivate readonly registeredConfigurationDefaults: IConfigurationDefaults[] = [];\n\tprivate readonly configurationDefaultsOverrides: Map<string, { configurationDefaultOverrides: IConfigurationDefaultOverride[]; configurationDefaultOverrideValue?: IConfigurationDefaultOverrideValue }>;\n\tprivate readonly defaultLanguageConfigurationOverridesNode: IConfigurationNode;\n\tprivate readonly configurationContributors: IConfigurationNode[];\n\tprivate readonly configurationProperties: IStringDictionary<IRegisteredConfigurationPropertySchema>;\n\tprivate readonly policyConfigurations: Map<PolicyName, string>;\n\tprivate readonly excludedConfigurationProperties: IStringDictionary<IRegisteredConfigurationPropertySchema>;\n\tprivate readonly resourceLanguageSettingsSchema: IJSONSchema;\n\tprivate readonly overrideIdentifiers = new Set<string>();\n\n\tprivate readonly _onDidSchemaChange = this._register(new Emitter<void>());\n\n\tprivate readonly _onDidUpdateConfiguration = this._register(new Emitter<{ properties: ReadonlySet<string>; defaultsOverrides?: boolean }>());\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis.configurationDefaultsOverrides = new Map();\n\t\tthis.defaultLanguageConfigurationOverridesNode = {\n\t\t\tid: 'defaultOverrides',\n\t\t\ttitle: nls.localize('defaultLanguageConfigurationOverrides.title', \"Default Language Configuration Overrides\"),\n\t\t\tproperties: {}\n\t\t};\n\t\tthis.configurationContributors = [this.defaultLanguageConfigurationOverridesNode];\n\t\tthis.resourceLanguageSettingsSchema = {\n\t\t\tproperties: {},\n\t\t\tpatternProperties: {},\n\t\t\tadditionalProperties: true,\n\t\t\tallowTrailingCommas: true,\n\t\t\tallowComments: true\n\t\t};\n\t\tthis.configurationProperties = {};\n\t\tthis.policyConfigurations = new Map<PolicyName, string>();\n\t\tthis.excludedConfigurationProperties = {};\n\n\t\tcontributionRegistry.registerSchema(resourceLanguageSettingsSchemaId, this.resourceLanguageSettingsSchema);\n\t\tthis.registerOverridePropertyPatternKey();\n\t}\n\n\tpublic registerConfiguration(configuration: IConfigurationNode, validate: boolean = true): IConfigurationNode {\n\t\tthis.registerConfigurations([configuration], validate);\n\t\treturn configuration;\n\t}\n\n\tpublic registerConfigurations(configurations: IConfigurationNode[], validate: boolean = true): void {\n\t\tconst properties = new Set<string>();\n\t\tthis.doRegisterConfigurations(configurations, validate, properties);\n\n\t\tcontributionRegistry.registerSchema(resourceLanguageSettingsSchemaId, this.resourceLanguageSettingsSchema);\n\t\tthis._onDidSchemaChange.fire();\n\t\tthis._onDidUpdateConfiguration.fire({ properties });\n\t}\n\n\tpublic registerDefaultConfigurations(configurationDefaults: IConfigurationDefaults[]): void {\n\t\tconst properties = new Set<string>();\n\t\tthis.doRegisterDefaultConfigurations(configurationDefaults, properties);\n\t\tthis._onDidSchemaChange.fire();\n\t\tthis._onDidUpdateConfiguration.fire({ properties, defaultsOverrides: true });\n\t}\n\n\tprivate doRegisterDefaultConfigurations(configurationDefaults: IConfigurationDefaults[], bucket: Set<string>) {\n\n\t\tthis.registeredConfigurationDefaults.push(...configurationDefaults);\n\n\t\tconst overrideIdentifiers: string[] = [];\n\n\t\tfor (const { overrides, source } of configurationDefaults) {\n\t\t\tfor (const key in overrides) {\n\t\t\t\tbucket.add(key);\n\n\t\t\t\tconst configurationDefaultOverridesForKey = this.configurationDefaultsOverrides.get(key)\n\t\t\t\t\t?? this.configurationDefaultsOverrides.set(key, { configurationDefaultOverrides: [] }).get(key)!;\n\n\t\t\t\tconst value = overrides[key];\n\t\t\t\tconfigurationDefaultOverridesForKey.configurationDefaultOverrides.push({ value, source });\n\n\t\t\t\t// Configuration defaults for Override Identifiers\n\t\t\t\tif (OVERRIDE_PROPERTY_REGEX.test(key)) {\n\t\t\t\t\tconst newDefaultOverride = this.mergeDefaultConfigurationsForOverrideIdentifier(key, value as IStringDictionary<unknown>, source, configurationDefaultOverridesForKey.configurationDefaultOverrideValue);\n\t\t\t\t\tif (!newDefaultOverride) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tconfigurationDefaultOverridesForKey.configurationDefaultOverrideValue = newDefaultOverride;\n\t\t\t\t\tthis.updateDefaultOverrideProperty(key, newDefaultOverride, source);\n\t\t\t\t\toverrideIdentifiers.push(...overrideIdentifiersFromKey(key));\n\t\t\t\t}\n\n\t\t\t\t// Configuration defaults for Configuration Properties\n\t\t\t\telse {\n\t\t\t\t\tconst newDefaultOverride = this.mergeDefaultConfigurationsForConfigurationProperty(key, value, source, configurationDefaultOverridesForKey.configurationDefaultOverrideValue);\n\t\t\t\t\tif (!newDefaultOverride) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tconfigurationDefaultOverridesForKey.configurationDefaultOverrideValue = newDefaultOverride;\n\t\t\t\t\tconst property = this.configurationProperties[key];\n\t\t\t\t\tif (property) {\n\t\t\t\t\t\tthis.updatePropertyDefaultValue(key, property);\n\t\t\t\t\t\tthis.updateSchema(key, property);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\tthis.doRegisterOverrideIdentifiers(overrideIdentifiers);\n\t}\n\n\tprivate updateDefaultOverrideProperty(key: string, newDefaultOverride: IConfigurationDefaultOverrideValue, source: IExtensionInfo | undefined): void {\n\t\tconst property: IRegisteredConfigurationPropertySchema = {\n\t\t\tsection: {\n\t\t\t\tid: this.defaultLanguageConfigurationOverridesNode.id,\n\t\t\t\ttitle: this.defaultLanguageConfigurationOverridesNode.title,\n\t\t\t\torder: this.defaultLanguageConfigurationOverridesNode.order,\n\t\t\t\textensionInfo: this.defaultLanguageConfigurationOverridesNode.extensionInfo\n\t\t\t},\n\t\t\ttype: 'object',\n\t\t\tdefault: newDefaultOverride.value,\n\t\t\tdescription: nls.localize('defaultLanguageConfiguration.description', \"Configure settings to be overridden for {0}.\", getLanguageTagSettingPlainKey(key)),\n\t\t\t$ref: resourceLanguageSettingsSchemaId,\n\t\t\tdefaultDefaultValue: newDefaultOverride.value,\n\t\t\tsource,\n\t\t\tdefaultValueSource: source\n\t\t};\n\t\tthis.configurationProperties[key] = property;\n\t\tthis.defaultLanguageConfigurationOverridesNode.properties![key] = property;\n\t}\n\n\tprivate mergeDefaultConfigurationsForOverrideIdentifier(overrideIdentifier: string, configurationValueObject: IStringDictionary<unknown>, valueSource: IExtensionInfo | undefined, existingDefaultOverride: IConfigurationDefaultOverrideValue | undefined): IConfigurationDefaultOverrideValue | undefined {\n\t\tconst defaultValue = existingDefaultOverride?.value || {};\n\t\tconst source = existingDefaultOverride?.source ?? new Map<string, IExtensionInfo>();\n\n\t\t// This should not happen\n\t\tif (!(source instanceof Map)) {\n\t\t\tconsole.error('objectConfigurationSources is not a Map');\n\t\t\treturn undefined;\n\t\t}\n\n\t\tfor (const propertyKey of Object.keys(configurationValueObject)) {\n\t\t\tconst propertyDefaultValue = configurationValueObject[propertyKey];\n\n\t\t\tconst isObjectSetting = types.isObject(propertyDefaultValue) &&\n\t\t\t\t(types.isUndefined((defaultValue as IStringDictionary<unknown>)[propertyKey]) || types.isObject((defaultValue as IStringDictionary<unknown>)[propertyKey]));\n\n\t\t\t// If the default value is an object, merge the objects and store the source of each keys\n\t\t\tif (isObjectSetting) {\n\t\t\t\t(defaultValue as IStringDictionary<unknown>)[propertyKey] = { ...((defaultValue as IStringDictionary<unknown>)[propertyKey] ?? {}), ...propertyDefaultValue };\n\t\t\t\t// Track the source of each value in the object\n\t\t\t\tif (valueSource) {\n\t\t\t\t\tfor (const objectKey in propertyDefaultValue) {\n\t\t\t\t\t\tsource.set(`${propertyKey}.${objectKey}`, valueSource);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Primitive values are overridden\n\t\t\telse {\n\t\t\t\t(defaultValue as IStringDictionary<unknown>)[propertyKey] = propertyDefaultValue;\n\t\t\t\tif (valueSource) {\n\t\t\t\t\tsource.set(propertyKey, valueSource);\n\t\t\t\t} else {\n\t\t\t\t\tsource.delete(propertyKey);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn { value: defaultValue, source };\n\t}\n\n\tprivate mergeDefaultConfigurationsForConfigurationProperty(propertyKey: string, value: unknown, valuesSource: IExtensionInfo | undefined, existingDefaultOverride: IConfigurationDefaultOverrideValue | undefined): IConfigurationDefaultOverrideValue | undefined {\n\t\tconst property = this.configurationProperties[propertyKey];\n\t\tconst existingDefaultValue = existingDefaultOverride?.value ?? property?.defaultDefaultValue;\n\t\tlet source: ConfigurationDefaultValueSource | undefined = valuesSource;\n\n\t\tconst isObjectSetting = types.isObject(value) &&\n\t\t\t(\n\t\t\t\tproperty !== undefined && property.type === 'object' ||\n\t\t\t\tproperty === undefined && (types.isUndefined(existingDefaultValue) || types.isObject(existingDefaultValue))\n\t\t\t);\n\n\t\t// If the default value is an object, merge the objects and store the source of each keys\n\t\tif (isObjectSetting) {\n\t\t\tsource = existingDefaultOverride?.source ?? new Map<string, IExtensionInfo>();\n\n\t\t\t// This should not happen\n\t\t\tif (!(source instanceof Map)) {\n\t\t\t\tconsole.error('defaultValueSource is not a Map');\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tfor (const objectKey in (value as IStringDictionary<unknown>)) {\n\t\t\t\tif (valuesSource) {\n\t\t\t\t\tsource.set(`${propertyKey}.${objectKey}`, valuesSource);\n\t\t\t\t}\n\t\t\t}\n\t\t\tvalue = { ...(types.isObject(existingDefaultValue) ? existingDefaultValue : {}), ...(value as IStringDictionary<unknown>) };\n\t\t}\n\n\t\treturn { value, source };\n\t}\n\n\tpublic registerOverrideIdentifiers(overrideIdentifiers: string[]): void {\n\t\tthis.doRegisterOverrideIdentifiers(overrideIdentifiers);\n\t\tthis._onDidSchemaChange.fire();\n\t}\n\n\tprivate doRegisterOverrideIdentifiers(overrideIdentifiers: string[]) {\n\t\tfor (const overrideIdentifier of overrideIdentifiers) {\n\t\t\tthis.overrideIdentifiers.add(overrideIdentifier);\n\t\t}\n\t\tthis.updateOverridePropertyPatternKey();\n\t}\n\n\tprivate doRegisterConfigurations(configurations: IConfigurationNode[], validate: boolean, bucket: Set<string>): void {\n\n\t\tconfigurations.forEach(configuration => {\n\n\t\t\tthis.validateAndRegisterProperties(configuration, validate, configuration.extensionInfo, configuration.restrictedProperties, undefined, bucket);\n\n\t\t\tthis.configurationContributors.push(configuration);\n\t\t\tthis.registerJSONConfiguration(configuration);\n\t\t});\n\t}\n\n\tprivate validateAndRegisterProperties(configuration: IConfigurationNode, validate: boolean = true, extensionInfo: IExtensionInfo | undefined, restrictedProperties: string[] | undefined, scope: ConfigurationScope = ConfigurationScope.WINDOW, bucket: Set<string>): void {\n\t\tscope = types.isUndefinedOrNull(configuration.scope) ? scope : configuration.scope;\n\t\tconst properties = configuration.properties;\n\t\tif (properties) {\n\t\t\tfor (const key in properties) {\n\t\t\t\tconst property: IRegisteredConfigurationPropertySchema = properties[key];\n\t\t\t\tproperty.section = {\n\t\t\t\t\tid: configuration.id,\n\t\t\t\t\ttitle: configuration.title,\n\t\t\t\t\torder: configuration.order,\n\t\t\t\t\textensionInfo: configuration.extensionInfo\n\t\t\t\t};\n\t\t\t\tif (validate && validateProperty(key, property, extensionInfo?.id)) {\n\t\t\t\t\tdelete properties[key];\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tproperty.source = extensionInfo;\n\n\t\t\t\t// update default value\n\t\t\t\tproperty.defaultDefaultValue = properties[key].default;\n\t\t\t\tthis.updatePropertyDefaultValue(key, property);\n\n\t\t\t\t// update scope\n\t\t\t\tif (OVERRIDE_PROPERTY_REGEX.test(key)) {\n\t\t\t\t\tproperty.scope = undefined; // No scope for overridable properties `[${identifier}]`\n\t\t\t\t} else {\n\t\t\t\t\tproperty.scope = types.isUndefinedOrNull(property.scope) ? scope : property.scope;\n\t\t\t\t\tproperty.restricted = types.isUndefinedOrNull(property.restricted) ? !!restrictedProperties?.includes(key) : property.restricted;\n\t\t\t\t}\n\n\t\t\t\tif (property.experiment) {\n\t\t\t\t\tif (!property.tags?.some(tag => tag.toLowerCase() === 'onexp')) {\n\t\t\t\t\t\tproperty.tags = property.tags ?? [];\n\t\t\t\t\t\tproperty.tags.push('onExP');\n\t\t\t\t\t}\n\t\t\t\t} else if (property.tags?.some(tag => tag.toLowerCase() === 'onexp')) {\n\t\t\t\t\tconsole.error(`Invalid tag 'onExP' found for property '${key}'. Please use 'experiment' property instead.`);\n\t\t\t\t\tproperty.experiment = { mode: 'startup' };\n\t\t\t\t}\n\n\t\t\t\tconst excluded = properties[key].hasOwnProperty('included') && !properties[key].included;\n\t\t\t\tconst policyName = properties[key].policy?.name;\n\n\t\t\t\tif (excluded) {\n\t\t\t\t\tthis.excludedConfigurationProperties[key] = properties[key];\n\t\t\t\t\tif (policyName) {\n\t\t\t\t\t\tthis.policyConfigurations.set(policyName, key);\n\t\t\t\t\t\tbucket.add(key);\n\t\t\t\t\t}\n\t\t\t\t\tdelete properties[key];\n\t\t\t\t} else {\n\t\t\t\t\tbucket.add(key);\n\t\t\t\t\tif (policyName) {\n\t\t\t\t\t\tthis.policyConfigurations.set(policyName, key);\n\t\t\t\t\t}\n\t\t\t\t\tthis.configurationProperties[key] = properties[key];\n\t\t\t\t\tif (!properties[key].deprecationMessage && properties[key].markdownDeprecationMessage) {\n\t\t\t\t\t\t// If not set, default deprecationMessage to the markdown source\n\t\t\t\t\t\tproperties[key].deprecationMessage = properties[key].markdownDeprecationMessage;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t}\n\t\t}\n\t\tconst subNodes = configuration.allOf;\n\t\tif (subNodes) {\n\t\t\tfor (const node of subNodes) {\n\t\t\t\tthis.validateAndRegisterProperties(node, validate, extensionInfo, restrictedProperties, scope, bucket);\n\t\t\t}\n\t\t}\n\t}\n\n\tgetConfigurationProperties(): IStringDictionary<IRegisteredConfigurationPropertySchema> {\n\t\treturn this.configurationProperties;\n\t}\n\n\tgetPolicyConfigurations(): Map<PolicyName, string> {\n\t\treturn this.policyConfigurations;\n\t}\n\n\tgetExcludedConfigurationProperties(): IStringDictionary<IRegisteredConfigurationPropertySchema> {\n\t\treturn this.excludedConfigurationProperties;\n\t}\n\n\tprivate registerJSONConfiguration(configuration: IConfigurationNode) {\n\t\tconst register = (configuration: IConfigurationNode) => {\n\t\t\tconst properties = configuration.properties;\n\t\t\tif (properties) {\n\t\t\t\tfor (const key in properties) {\n\t\t\t\t\tthis.updateSchema(key, properties[key]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst subNodes = configuration.allOf;\n\t\t\tsubNodes?.forEach(register);\n\t\t};\n\t\tregister(configuration);\n\t}\n\n\tprivate updateSchema(key: string, property: IConfigurationPropertySchema): void {\n\t\tallSettings.properties[key] = property;\n\t\tswitch (property.scope) {\n\t\t\tcase ConfigurationScope.APPLICATION:\n\t\t\t\tapplicationSettings.properties[key] = property;\n\t\t\t\tbreak;\n\t\t\tcase ConfigurationScope.MACHINE:\n\t\t\t\tmachineSettings.properties[key] = property;\n\t\t\t\tbreak;\n\t\t\tcase ConfigurationScope.APPLICATION_MACHINE:\n\t\t\t\tapplicationMachineSettings.properties[key] = property;\n\t\t\t\tbreak;\n\t\t\tcase ConfigurationScope.MACHINE_OVERRIDABLE:\n\t\t\t\tmachineOverridableSettings.properties[key] = property;\n\t\t\t\tbreak;\n\t\t\tcase ConfigurationScope.WINDOW:\n\t\t\t\twindowSettings.properties[key] = property;\n\t\t\t\tbreak;\n\t\t\tcase ConfigurationScope.RESOURCE:\n\t\t\t\tresourceSettings.properties[key] = property;\n\t\t\t\tbreak;\n\t\t\tcase ConfigurationScope.LANGUAGE_OVERRIDABLE:\n\t\t\t\tresourceSettings.properties[key] = property;\n\t\t\t\tthis.resourceLanguageSettingsSchema.properties![key] = property;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tprivate updateOverridePropertyPatternKey(): void {\n\t\tfor (const overrideIdentifier of this.overrideIdentifiers.values()) {\n\t\t\tconst overrideIdentifierProperty = `[${overrideIdentifier}]`;\n\t\t\tconst resourceLanguagePropertiesSchema: IJSONSchema = {\n\t\t\t\ttype: 'object',\n\t\t\t\tdescription: nls.localize('overrideSettings.defaultDescription', \"Configure editor settings to be overridden for a language.\"),\n\t\t\t\terrorMessage: nls.localize('overrideSettings.errorMessage', \"This setting does not support per-language configuration.\"),\n\t\t\t\t$ref: resourceLanguageSettingsSchemaId,\n\t\t\t};\n\t\t\tthis.updatePropertyDefaultValue(overrideIdentifierProperty, resourceLanguagePropertiesSchema);\n\t\t\tallSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n\t\t\tapplicationSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n\t\t\tapplicationMachineSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n\t\t\tmachineSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n\t\t\tmachineOverridableSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n\t\t\twindowSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n\t\t\tresourceSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n\t\t}\n\t}\n\n\tprivate registerOverridePropertyPatternKey(): void {\n\t\tconst resourceLanguagePropertiesSchema: IJSONSchema = {\n\t\t\ttype: 'object',\n\t\t\tdescription: nls.localize('overrideSettings.defaultDescription', \"Configure editor settings to be overridden for a language.\"),\n\t\t\terrorMessage: nls.localize('overrideSettings.errorMessage', \"This setting does not support per-language configuration.\"),\n\t\t\t$ref: resourceLanguageSettingsSchemaId,\n\t\t};\n\t\tallSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n\t\tapplicationSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n\t\tapplicationMachineSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n\t\tmachineSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n\t\tmachineOverridableSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n\t\twindowSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n\t\tresourceSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n\t\tthis._onDidSchemaChange.fire();\n\t}\n\n\tprivate updatePropertyDefaultValue(key: string, property: IRegisteredConfigurationPropertySchema): void {\n\t\tconst configurationdefaultOverride = this.configurationDefaultsOverrides.get(key)?.configurationDefaultOverrideValue;\n\t\tlet defaultValue = undefined;\n\t\tlet defaultSource = undefined;\n\t\tif (configurationdefaultOverride\n\t\t\t&& (!property.disallowConfigurationDefault || !configurationdefaultOverride.source) // Prevent overriding the default value if the property is disallowed to be overridden by configuration defaults from extensions\n\t\t) {\n\t\t\tdefaultValue = configurationdefaultOverride.value;\n\t\t\tdefaultSource = configurationdefaultOverride.source;\n\t\t}\n\t\tif (types.isUndefined(defaultValue)) {\n\t\t\tdefaultValue = property.defaultDefaultValue;\n\t\t\tdefaultSource = undefined;\n\t\t}\n\t\tif (types.isUndefined(defaultValue)) {\n\t\t\tdefaultValue = getDefaultValue(property.type);\n\t\t}\n\t\tproperty.default = defaultValue;\n\t\tproperty.defaultValueSource = defaultSource;\n\t}\n}\n\nconst OVERRIDE_IDENTIFIER_PATTERN = `\\\\[([^\\\\]]+)\\\\]`;\nconst OVERRIDE_IDENTIFIER_REGEX = new RegExp(OVERRIDE_IDENTIFIER_PATTERN, 'g');\nexport const OVERRIDE_PROPERTY_PATTERN = `^(${OVERRIDE_IDENTIFIER_PATTERN})+$`;\nexport const OVERRIDE_PROPERTY_REGEX = new RegExp(OVERRIDE_PROPERTY_PATTERN);\n\nexport function overrideIdentifiersFromKey(key: string): string[] {\n\tconst identifiers: string[] = [];\n\tif (OVERRIDE_PROPERTY_REGEX.test(key)) {\n\t\tlet matches = OVERRIDE_IDENTIFIER_REGEX.exec(key);\n\t\twhile (matches?.length) {\n\t\t\tconst identifier = matches[1].trim();\n\t\t\tif (identifier) {\n\t\t\t\tidentifiers.push(identifier);\n\t\t\t}\n\t\t\tmatches = OVERRIDE_IDENTIFIER_REGEX.exec(key);\n\t\t}\n\t}\n\treturn distinct(identifiers);\n}\n\nexport function getDefaultValue(type: string | string[] | undefined) {\n\tconst t = Array.isArray(type) ? type[0] : <string>type;\n\tswitch (t) {\n\t\tcase 'boolean':\n\t\t\treturn false;\n\t\tcase 'integer':\n\t\tcase 'number':\n\t\t\treturn 0;\n\t\tcase 'string':\n\t\t\treturn '';\n\t\tcase 'array':\n\t\t\treturn [];\n\t\tcase 'object':\n\t\t\treturn {};\n\t\tdefault:\n\t\t\treturn null;\n\t}\n}\n\nconst configurationRegistry = new ConfigurationRegistry();\nRegistry.add(Extensions.Configuration, configurationRegistry);\n\nexport function validateProperty(property: string, schema: IRegisteredConfigurationPropertySchema, extensionId?: string): string | null {\n\tif (!property.trim()) {\n\t\treturn nls.localize('config.property.empty', \"Cannot register an empty property\");\n\t}\n\tif (OVERRIDE_PROPERTY_REGEX.test(property)) {\n\t\treturn nls.localize('config.property.languageDefault', \"Cannot register '{0}'. This matches property pattern '\\\\\\\\[.*\\\\\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.\", property);\n\t}\n\tif (configurationRegistry.getConfigurationProperties()[property] !== undefined && (!extensionId || !EXTENSION_UNIFICATION_EXTENSION_IDS.has(extensionId.toLowerCase()))) {\n\t\treturn nls.localize('config.property.duplicate', \"Cannot register '{0}'. This property is already registered.\", property);\n\t}\n\tif (schema.policy?.name && configurationRegistry.getPolicyConfigurations().get(schema.policy?.name) !== undefined) {\n\t\treturn nls.localize('config.policy.duplicate', \"Cannot register '{0}'. The associated policy {1} is already registered with {2}.\", property, schema.policy?.name, configurationRegistry.getPolicyConfigurations().get(schema.policy?.name));\n\t}\n\treturn null;\n}\n\n// Used for extension unification. Should be removed when complete.\nexport const EXTENSION_UNIFICATION_EXTENSION_IDS: Set<string> = new Set(product.defaultChatAgent ? [product.defaultChatAgent.extensionId, product.defaultChatAgent.chatExtensionId].map(id => id.toLowerCase()) : []);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/platform/configuration/common/configurations.ts","vs/platform/configuration/common/configurations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAkE,MAAM,4BAA4B,CAAC;AAExH,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAE7D,MAAM,OAAO,oBAAqB,SAAQ,UAAU;IAGnD,IAAI,kBAAkB;QACrB,OAAO,IAAI,CAAC,mBAAmB,CAAC;IACjC,CAAC;IAED,YAA6B,UAAuB;QACnD,KAAK,EAAE,CAAC;QADoB,eAAU,GAAV,UAAU,CAAa;QAEnD,IAAI,CAAC,mBAAmB,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAC5E,CAAC;IAED,MAAM;QACL,IAAI,CAAC,uBAAuB,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,kBAAkB,CAAC;IAChC,CAAC;IAES,gCAAgC;QACzC,OAAO,EAAE,CAAC;IACX,CAAC;IAEO,uBAAuB;QAC9B,IAAI,CAAC,mBAAmB,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAChF,MAAM,UAAU,GAAG,QAAQ,CAAC,EAAE,CAAyB,UAAU,CAAC,aAAa,CAAC,CAAC,0BAA0B,EAAE,CAAC;QAC9G,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC,CAAC;IACpE,CAAC;IAEO,wBAAwB,CAAC,UAAoB,EAAE,uBAAkF;QACxI,MAAM,8BAA8B,GAAG,IAAI,CAAC,gCAAgC,EAAE,CAAC;QAC/E,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;YAC9B,MAAM,oBAAoB,GAAG,8BAA8B,CAAC,GAAG,CAAC,CAAC;YACjE,MAAM,cAAc,GAAG,uBAAuB,CAAC,GAAG,CAAC,CAAC;YACpD,IAAI,oBAAoB,KAAK,SAAS,EAAE,CAAC;gBACxC,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,GAAG,EAAE,oBAAoB,CAAC,CAAC;YAC9D,CAAC;iBAAM,IAAI,cAAc,EAAE,CAAC;gBAC3B,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;YAC3E,CAAC;iBAAM,CAAC;gBACP,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;YAC3C,CAAC;QACF,CAAC;IACF,CAAC;CAED","file":"configurations.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["\nimport { IStringDictionary } from '../../../base/common/collections.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport { deepClone } from '../../../base/common/objects.js';\nimport { ConfigurationModel } from './configurationModels.js';\nimport { Extensions, IConfigurationRegistry, IRegisteredConfigurationPropertySchema } from './configurationRegistry.js';\nimport { ILogService } from '../../log/common/log.js';\nimport { Registry } from '../../registry/common/platform.js';\n\nexport class DefaultConfiguration extends Disposable {\n\n\tprivate _configurationModel: ConfigurationModel;\n\tget configurationModel(): ConfigurationModel {\n\t\treturn this._configurationModel;\n\t}\n\n\tconstructor(private readonly logService: ILogService) {\n\t\tsuper();\n\t\tthis._configurationModel = ConfigurationModel.createEmptyModel(logService);\n\t}\n\n\treload(): ConfigurationModel {\n\t\tthis.resetConfigurationModel();\n\t\treturn this.configurationModel;\n\t}\n\n\tprotected getConfigurationDefaultOverrides(): IStringDictionary<
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/platform/configuration/common/configurations.ts","vs/platform/configuration/common/configurations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAkE,MAAM,4BAA4B,CAAC;AAExH,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAE7D,MAAM,OAAO,oBAAqB,SAAQ,UAAU;IAGnD,IAAI,kBAAkB;QACrB,OAAO,IAAI,CAAC,mBAAmB,CAAC;IACjC,CAAC;IAED,YAA6B,UAAuB;QACnD,KAAK,EAAE,CAAC;QADoB,eAAU,GAAV,UAAU,CAAa;QAEnD,IAAI,CAAC,mBAAmB,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAC5E,CAAC;IAED,MAAM;QACL,IAAI,CAAC,uBAAuB,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,kBAAkB,CAAC;IAChC,CAAC;IAES,gCAAgC;QACzC,OAAO,EAAE,CAAC;IACX,CAAC;IAEO,uBAAuB;QAC9B,IAAI,CAAC,mBAAmB,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAChF,MAAM,UAAU,GAAG,QAAQ,CAAC,EAAE,CAAyB,UAAU,CAAC,aAAa,CAAC,CAAC,0BAA0B,EAAE,CAAC;QAC9G,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC,CAAC;IACpE,CAAC;IAEO,wBAAwB,CAAC,UAAoB,EAAE,uBAAkF;QACxI,MAAM,8BAA8B,GAAG,IAAI,CAAC,gCAAgC,EAAE,CAAC;QAC/E,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;YAC9B,MAAM,oBAAoB,GAAG,8BAA8B,CAAC,GAAG,CAAC,CAAC;YACjE,MAAM,cAAc,GAAG,uBAAuB,CAAC,GAAG,CAAC,CAAC;YACpD,IAAI,oBAAoB,KAAK,SAAS,EAAE,CAAC;gBACxC,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,GAAG,EAAE,oBAAoB,CAAC,CAAC;YAC9D,CAAC;iBAAM,IAAI,cAAc,EAAE,CAAC;gBAC3B,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;YAC3E,CAAC;iBAAM,CAAC;gBACP,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;YAC3C,CAAC;QACF,CAAC;IACF,CAAC;CAED","file":"configurations.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["\nimport { IStringDictionary } from '../../../base/common/collections.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport { deepClone } from '../../../base/common/objects.js';\nimport { ConfigurationModel } from './configurationModels.js';\nimport { Extensions, IConfigurationRegistry, IRegisteredConfigurationPropertySchema } from './configurationRegistry.js';\nimport { ILogService } from '../../log/common/log.js';\nimport { Registry } from '../../registry/common/platform.js';\n\nexport class DefaultConfiguration extends Disposable {\n\n\tprivate _configurationModel: ConfigurationModel;\n\tget configurationModel(): ConfigurationModel {\n\t\treturn this._configurationModel;\n\t}\n\n\tconstructor(private readonly logService: ILogService) {\n\t\tsuper();\n\t\tthis._configurationModel = ConfigurationModel.createEmptyModel(logService);\n\t}\n\n\treload(): ConfigurationModel {\n\t\tthis.resetConfigurationModel();\n\t\treturn this.configurationModel;\n\t}\n\n\tprotected getConfigurationDefaultOverrides(): IStringDictionary<unknown> {\n\t\treturn {};\n\t}\n\n\tprivate resetConfigurationModel(): void {\n\t\tthis._configurationModel = ConfigurationModel.createEmptyModel(this.logService);\n\t\tconst properties = Registry.as<IConfigurationRegistry>(Extensions.Configuration).getConfigurationProperties();\n\t\tthis.updateConfigurationModel(Object.keys(properties), properties);\n\t}\n\n\tprivate updateConfigurationModel(properties: string[], configurationProperties: IStringDictionary<IRegisteredConfigurationPropertySchema>): void {\n\t\tconst configurationDefaultsOverrides = this.getConfigurationDefaultOverrides();\n\t\tfor (const key of properties) {\n\t\t\tconst defaultOverrideValue = configurationDefaultsOverrides[key];\n\t\t\tconst propertySchema = configurationProperties[key];\n\t\t\tif (defaultOverrideValue !== undefined) {\n\t\t\t\tthis._configurationModel.setValue(key, defaultOverrideValue);\n\t\t\t} else if (propertySchema) {\n\t\t\t\tthis._configurationModel.setValue(key, deepClone(propertySchema.default));\n\t\t\t} else {\n\t\t\t\tthis._configurationModel.removeValue(key);\n\t\t\t}\n\t\t}\n\t}\n\n}\n","\nimport { IStringDictionary } from '../../../base/common/collections.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport { deepClone } from '../../../base/common/objects.js';\nimport { ConfigurationModel } from './configurationModels.js';\nimport { Extensions, IConfigurationRegistry, IRegisteredConfigurationPropertySchema } from './configurationRegistry.js';\nimport { ILogService } from '../../log/common/log.js';\nimport { Registry } from '../../registry/common/platform.js';\n\nexport class DefaultConfiguration extends Disposable {\n\n\tprivate _configurationModel: ConfigurationModel;\n\tget configurationModel(): ConfigurationModel {\n\t\treturn this._configurationModel;\n\t}\n\n\tconstructor(private readonly logService: ILogService) {\n\t\tsuper();\n\t\tthis._configurationModel = ConfigurationModel.createEmptyModel(logService);\n\t}\n\n\treload(): ConfigurationModel {\n\t\tthis.resetConfigurationModel();\n\t\treturn this.configurationModel;\n\t}\n\n\tprotected getConfigurationDefaultOverrides(): IStringDictionary<unknown> {\n\t\treturn {};\n\t}\n\n\tprivate resetConfigurationModel(): void {\n\t\tthis._configurationModel = ConfigurationModel.createEmptyModel(this.logService);\n\t\tconst properties = Registry.as<IConfigurationRegistry>(Extensions.Configuration).getConfigurationProperties();\n\t\tthis.updateConfigurationModel(Object.keys(properties), properties);\n\t}\n\n\tprivate updateConfigurationModel(properties: string[], configurationProperties: IStringDictionary<IRegisteredConfigurationPropertySchema>): void {\n\t\tconst configurationDefaultsOverrides = this.getConfigurationDefaultOverrides();\n\t\tfor (const key of properties) {\n\t\t\tconst defaultOverrideValue = configurationDefaultsOverrides[key];\n\t\t\tconst propertySchema = configurationProperties[key];\n\t\t\tif (defaultOverrideValue !== undefined) {\n\t\t\t\tthis._configurationModel.setValue(key, defaultOverrideValue);\n\t\t\t} else if (propertySchema) {\n\t\t\t\tthis._configurationModel.setValue(key, deepClone(propertySchema.default));\n\t\t\t} else {\n\t\t\t\tthis._configurationModel.removeValue(key);\n\t\t\t}\n\t\t}\n\t}\n\n}\n"]}
|
|
@@ -14,7 +14,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
14
14
|
import { Event, PauseableEmitter } from '../../../base/common/event.js';
|
|
15
15
|
import { Iterable } from '../../../base/common/iterator.js';
|
|
16
16
|
import { Disposable, DisposableStore, MutableDisposable } from '../../../base/common/lifecycle.js';
|
|
17
|
-
import { cloneAndChange } from '../../../base/common/objects.js';
|
|
17
|
+
import { cloneAndChange, equals } from '../../../base/common/objects.js';
|
|
18
18
|
import { TernarySearchTree } from '../../../base/common/ternarySearchTree.js';
|
|
19
19
|
import { URI } from '../../../base/common/uri.js';
|
|
20
20
|
import { localize } from '../../../nls.js';
|
|
@@ -37,7 +37,7 @@ export class Context {
|
|
|
37
37
|
}
|
|
38
38
|
setValue(key, value) {
|
|
39
39
|
// console.log('SET ' + key + ' = ' + value + ' ON ' + this._id);
|
|
40
|
-
if (this._value[key]
|
|
40
|
+
if (!equals(this._value[key], value)) {
|
|
41
41
|
this._value[key] = value;
|
|
42
42
|
return true;
|
|
43
43
|
}
|
|
@@ -448,7 +448,7 @@ CommandsRegistry.registerCommand({
|
|
|
448
448
|
return [...RawContextKey.all()].sort((a, b) => a.key.localeCompare(b.key));
|
|
449
449
|
},
|
|
450
450
|
metadata: {
|
|
451
|
-
description: localize(
|
|
451
|
+
description: localize(1681, "A command that returns information about context keys"),
|
|
452
452
|
args: []
|
|
453
453
|
}
|
|
454
454
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["vs/platform/contextkey/browser/contextKeyService.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAW,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,eAAe,EAAe,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAGhH,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,GAAG,EAAE,MAAM,6BAA6B,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAuB,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACzG,OAAO,EAAwG,kBAA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,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5E,CAAC;IACD,QAAQ,EAAE;QACT,WAAW,EAAE,QAAQ,CAAC,IAAmB,EAAE,uDAAuD,CAAC;QACnG,IAAI,EAAE,EAAE;KACR;CACD,CAAC,CAAC;AAEH,gBAAgB,CAAC,eAAe,CAAC,yBAAyB,EAAE;IAC3D,MAAM,MAAM,GAAqB,EAAE,CAAC;IACpC,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,MAAM,IAAI,IAAI,aAAa,CAAC,GAAG,EAAE,EAAE,CAAC;QACxC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;YACzB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACnB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnB,CAAC;IACF,CAAC;IACD,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAClD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;AACnD,CAAC,CAAC,CAAC","file":"contextKeyService.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 { Emitter, Event, PauseableEmitter } from '../../../base/common/event.js';\nimport { Iterable } from '../../../base/common/iterator.js';\nimport { Disposable, DisposableStore, IDisposable, MutableDisposable } from '../../../base/common/lifecycle.js';\nimport { MarshalledObject } from '../../../base/common/marshalling.js';\nimport { MarshalledId } from '../../../base/common/marshallingIds.js';\nimport { cloneAndChange } from '../../../base/common/objects.js';\nimport { TernarySearchTree } from '../../../base/common/ternarySearchTree.js';\nimport { URI } from '../../../base/common/uri.js';\nimport { localize } from '../../../nls.js';\nimport { CommandsRegistry } from '../../commands/common/commands.js';\nimport { ConfigurationTarget, IConfigurationService } from '../../configuration/common/configuration.js';\nimport { ContextKeyExpression, ContextKeyInfo, ContextKeyValue, IContext, IContextKey, IContextKeyChangeEvent, IContextKeyService, IContextKeyServiceTarget, IReadableSet, IScopedContextKeyService, RawContextKey } from '../common/contextkey.js';\nimport { ServicesAccessor } from '../../instantiation/common/instantiation.js';\nimport { InputFocusedContext } from '../common/contextkeys.js';\nimport { mainWindow } from '../../../base/browser/window.js';\nimport { addDisposableListener, EventType, getActiveWindow, isEditableElement, onDidRegisterWindow, trackFocus } from '../../../base/browser/dom.js';\n\nconst KEYBINDING_CONTEXT_ATTR = 'data-keybinding-context';\n\nexport class Context implements IContext {\n\n\tprotected _parent: Context | null;\n\tprotected _value: Record<string, any>;\n\tprotected _id: number;\n\n\tconstructor(id: number, parent: Context | null) {\n\t\tthis._id = id;\n\t\tthis._parent = parent;\n\t\tthis._value = Object.create(null);\n\t\tthis._value['_contextId'] = id;\n\t}\n\n\tpublic get value(): Record<string, any> {\n\t\treturn { ...this._value };\n\t}\n\n\tpublic setValue(key: string, value: any): boolean {\n\t\t// console.log('SET ' + key + ' = ' + value + ' ON ' + this._id);\n\t\tif (this._value[key] !== value) {\n\t\t\tthis._value[key] = value;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tpublic removeValue(key: string): boolean {\n\t\t// console.log('REMOVE ' + key + ' FROM ' + this._id);\n\t\tif (key in this._value) {\n\t\t\tdelete this._value[key];\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tpublic getValue<T>(key: string): T | undefined {\n\t\tconst ret = this._value[key];\n\t\tif (typeof ret === 'undefined' && this._parent) {\n\t\t\treturn this._parent.getValue<T>(key);\n\t\t}\n\t\treturn ret;\n\t}\n}\n\nclass NullContext extends Context {\n\n\tstatic readonly INSTANCE = new NullContext();\n\n\tconstructor() {\n\t\tsuper(-1, null);\n\t}\n\n\tpublic override setValue(key: string, value: any): boolean {\n\t\treturn false;\n\t}\n\n\tpublic override removeValue(key: string): boolean {\n\t\treturn false;\n\t}\n\n\tpublic override getValue<T>(key: string): T | undefined {\n\t\treturn undefined;\n\t}\n}\n\nclass ConfigAwareContextValuesContainer extends Context {\n\tprivate static readonly _keyPrefix = 'config.';\n\n\tprivate readonly _values = TernarySearchTree.forConfigKeys<any>();\n\tprivate readonly _listener: IDisposable;\n\n\tconstructor(\n\t\tid: number,\n\t\tprivate readonly _configurationService: IConfigurationService,\n\t\temitter: Emitter<IContextKeyChangeEvent>\n\t) {\n\t\tsuper(id, null);\n\n\t\tthis._listener = this._configurationService.onDidChangeConfiguration(event => {\n\t\t\tif (event.source === ConfigurationTarget.DEFAULT) {\n\t\t\t\t// new setting, reset everything\n\t\t\t\tconst allKeys = Array.from(this._values, ([k]) => k);\n\t\t\t\tthis._values.clear();\n\t\t\t\temitter.fire(new ArrayContextKeyChangeEvent(allKeys));\n\t\t\t} else {\n\t\t\t\tconst changedKeys: string[] = [];\n\t\t\t\tfor (const configKey of event.affectedKeys) {\n\t\t\t\t\tconst contextKey = `config.${configKey}`;\n\n\t\t\t\t\tconst cachedItems = this._values.findSuperstr(contextKey);\n\t\t\t\t\tif (cachedItems !== undefined) {\n\t\t\t\t\t\tchangedKeys.push(...Iterable.map(cachedItems, ([key]) => key));\n\t\t\t\t\t\tthis._values.deleteSuperstr(contextKey);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (this._values.has(contextKey)) {\n\t\t\t\t\t\tchangedKeys.push(contextKey);\n\t\t\t\t\t\tthis._values.delete(contextKey);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\temitter.fire(new ArrayContextKeyChangeEvent(changedKeys));\n\t\t\t}\n\t\t});\n\t}\n\n\tdispose(): void {\n\t\tthis._listener.dispose();\n\t}\n\n\toverride getValue(key: string): any {\n\n\t\tif (key.indexOf(ConfigAwareContextValuesContainer._keyPrefix) !== 0) {\n\t\t\treturn super.getValue(key);\n\t\t}\n\n\t\tif (this._values.has(key)) {\n\t\t\treturn this._values.get(key);\n\t\t}\n\n\t\tconst configKey = key.substr(ConfigAwareContextValuesContainer._keyPrefix.length);\n\t\tconst configValue = this._configurationService.getValue(configKey);\n\t\tlet value: any = undefined;\n\t\tswitch (typeof configValue) {\n\t\t\tcase 'number':\n\t\t\tcase 'boolean':\n\t\t\tcase 'string':\n\t\t\t\tvalue = configValue;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif (Array.isArray(configValue)) {\n\t\t\t\t\tvalue = JSON.stringify(configValue);\n\t\t\t\t} else {\n\t\t\t\t\tvalue = configValue;\n\t\t\t\t}\n\t\t}\n\n\t\tthis._values.set(key, value);\n\t\treturn value;\n\t}\n\n\toverride setValue(key: string, value: any): boolean {\n\t\treturn super.setValue(key, value);\n\t}\n\n\toverride removeValue(key: string): boolean {\n\t\treturn super.removeValue(key);\n\t}\n}\n\nclass ContextKey<T extends ContextKeyValue> implements IContextKey<T> {\n\n\tprivate _service: AbstractContextKeyService;\n\tprivate _key: string;\n\tprivate _defaultValue: T | undefined;\n\n\tconstructor(service: AbstractContextKeyService, key: string, defaultValue: T | undefined) {\n\t\tthis._service = service;\n\t\tthis._key = key;\n\t\tthis._defaultValue = defaultValue;\n\t\tthis.reset();\n\t}\n\n\tpublic set(value: T): void {\n\t\tthis._service.setContext(this._key, value);\n\t}\n\n\tpublic reset(): void {\n\t\tif (typeof this._defaultValue === 'undefined') {\n\t\t\tthis._service.removeContext(this._key);\n\t\t} else {\n\t\t\tthis._service.setContext(this._key, this._defaultValue);\n\t\t}\n\t}\n\n\tpublic get(): T | undefined {\n\t\treturn this._service.getContextKeyValue<T>(this._key);\n\t}\n}\n\nclass SimpleContextKeyChangeEvent implements IContextKeyChangeEvent {\n\tconstructor(readonly key: string) { }\n\taffectsSome(keys: IReadableSet<string>): boolean {\n\t\treturn keys.has(this.key);\n\t}\n\tallKeysContainedIn(keys: IReadableSet<string>): boolean {\n\t\treturn this.affectsSome(keys);\n\t}\n}\n\nclass ArrayContextKeyChangeEvent implements IContextKeyChangeEvent {\n\tconstructor(readonly keys: string[]) { }\n\taffectsSome(keys: IReadableSet<string>): boolean {\n\t\tfor (const key of this.keys) {\n\t\t\tif (keys.has(key)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\tallKeysContainedIn(keys: IReadableSet<string>): boolean {\n\t\treturn this.keys.every(key => keys.has(key));\n\t}\n}\n\nclass CompositeContextKeyChangeEvent implements IContextKeyChangeEvent {\n\tconstructor(readonly events: IContextKeyChangeEvent[]) { }\n\taffectsSome(keys: IReadableSet<string>): boolean {\n\t\tfor (const e of this.events) {\n\t\t\tif (e.affectsSome(keys)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\tallKeysContainedIn(keys: IReadableSet<string>): boolean {\n\t\treturn this.events.every(evt => evt.allKeysContainedIn(keys));\n\t}\n}\n\nfunction allEventKeysInContext(event: IContextKeyChangeEvent, context: Record<string, any>): boolean {\n\treturn event.allKeysContainedIn(new Set(Object.keys(context)));\n}\n\nexport abstract class AbstractContextKeyService extends Disposable implements IContextKeyService {\n\tdeclare _serviceBrand: undefined;\n\n\tprotected _isDisposed: boolean;\n\tprotected _myContextId: number;\n\n\tprotected _onDidChangeContext = this._register(new PauseableEmitter<IContextKeyChangeEvent>({ merge: input => new CompositeContextKeyChangeEvent(input) }));\n\tget onDidChangeContext() { return this._onDidChangeContext.event; }\n\n\tconstructor(myContextId: number) {\n\t\tsuper();\n\t\tthis._isDisposed = false;\n\t\tthis._myContextId = myContextId;\n\t}\n\n\tpublic createKey<T extends ContextKeyValue>(key: string, defaultValue: T | undefined): IContextKey<T> {\n\t\tif (this._isDisposed) {\n\t\t\tthrow new Error(`AbstractContextKeyService has been disposed`);\n\t\t}\n\t\treturn new ContextKey(this, key, defaultValue);\n\t}\n\n\n\tbufferChangeEvents(callback: Function): void {\n\t\tthis._onDidChangeContext.pause();\n\t\ttry {\n\t\t\tcallback();\n\t\t} finally {\n\t\t\tthis._onDidChangeContext.resume();\n\t\t}\n\t}\n\n\tpublic createScoped(domNode: IContextKeyServiceTarget): IScopedContextKeyService {\n\t\tif (this._isDisposed) {\n\t\t\tthrow new Error(`AbstractContextKeyService has been disposed`);\n\t\t}\n\t\treturn new ScopedContextKeyService(this, domNode);\n\t}\n\n\tpublic contextMatchesRules(rules: ContextKeyExpression | undefined): boolean {\n\t\tif (this._isDisposed) {\n\t\t\tthrow new Error(`AbstractContextKeyService has been disposed`);\n\t\t}\n\t\tconst context = this.getContextValuesContainer(this._myContextId);\n\t\tconst result = (rules ? rules.evaluate(context) : true);\n\t\t// console.group(rules.serialize() + ' -> ' + result);\n\t\t// rules.keys().forEach(key => { console.log(key, ctx[key]); });\n\t\t// console.groupEnd();\n\t\treturn result;\n\t}\n\n\tpublic getContextKeyValue<T>(key: string): T | undefined {\n\t\tif (this._isDisposed) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn this.getContextValuesContainer(this._myContextId).getValue<T>(key);\n\t}\n\n\tpublic setContext(key: string, value: any): void {\n\t\tif (this._isDisposed) {\n\t\t\treturn;\n\t\t}\n\t\tconst myContext = this.getContextValuesContainer(this._myContextId);\n\t\tif (!myContext) {\n\t\t\treturn;\n\t\t}\n\t\tif (myContext.setValue(key, value)) {\n\t\t\tthis._onDidChangeContext.fire(new SimpleContextKeyChangeEvent(key));\n\t\t}\n\t}\n\n\tpublic removeContext(key: string): void {\n\t\tif (this._isDisposed) {\n\t\t\treturn;\n\t\t}\n\t\tif (this.getContextValuesContainer(this._myContextId).removeValue(key)) {\n\t\t\tthis._onDidChangeContext.fire(new SimpleContextKeyChangeEvent(key));\n\t\t}\n\t}\n\n\tpublic getContext(target: IContextKeyServiceTarget | null): IContext {\n\t\tif (this._isDisposed) {\n\t\t\treturn NullContext.INSTANCE;\n\t\t}\n\t\treturn this.getContextValuesContainer(findContextAttr(target));\n\t}\n\n\tpublic abstract getContextValuesContainer(contextId: number): Context;\n\tpublic abstract createChildContext(parentContextId?: number): number;\n\tpublic abstract disposeContext(contextId: number): void;\n\n\tpublic override dispose(): void {\n\t\tsuper.dispose();\n\t\tthis._isDisposed = true;\n\t}\n}\n\nexport class ContextKeyService extends AbstractContextKeyService implements IContextKeyService {\n\n\tprivate _lastContextId: number;\n\tprivate readonly _contexts = new Map<number, Context>();\n\n\tprivate inputFocusedContext: IContextKey<boolean>;\n\n\tconstructor(@IConfigurationService configurationService: IConfigurationService) {\n\t\tsuper(0);\n\t\tthis._lastContextId = 0;\n\t\tthis.inputFocusedContext = InputFocusedContext.bindTo(this);\n\n\t\tconst myContext = this._register(new ConfigAwareContextValuesContainer(this._myContextId, configurationService, this._onDidChangeContext));\n\t\tthis._contexts.set(this._myContextId, myContext);\n\n\t\t// Uncomment this to see the contexts continuously logged\n\t\t// let lastLoggedValue: string | null = null;\n\t\t// setInterval(() => {\n\t\t// \tlet values = Object.keys(this._contexts).map((key) => this._contexts[key]);\n\t\t// \tlet logValue = values.map(v => JSON.stringify(v._value, null, '\\t')).join('\\n');\n\t\t// \tif (lastLoggedValue !== logValue) {\n\t\t// \t\tlastLoggedValue = logValue;\n\t\t// \t\tconsole.log(lastLoggedValue);\n\t\t// \t}\n\t\t// }, 2000);\n\n\t\tthis._register(Event.runAndSubscribe(onDidRegisterWindow, ({ window, disposables }) => {\n\t\t\tconst onFocusDisposables = disposables.add(new MutableDisposable<DisposableStore>());\n\t\t\tdisposables.add(addDisposableListener(window, EventType.FOCUS_IN, () => {\n\t\t\t\tonFocusDisposables.value = new DisposableStore();\n\t\t\t\tthis.updateInputContextKeys(window.document, onFocusDisposables.value);\n\t\t\t}, true));\n\t\t}, { window: mainWindow, disposables: this._store }));\n\t}\n\n\tprivate updateInputContextKeys(ownerDocument: Document, disposables: DisposableStore): void {\n\n\t\tfunction activeElementIsInput(): boolean {\n\t\t\treturn !!ownerDocument.activeElement && isEditableElement(ownerDocument.activeElement);\n\t\t}\n\n\t\tconst isInputFocused = activeElementIsInput();\n\t\tthis.inputFocusedContext.set(isInputFocused);\n\n\t\tif (isInputFocused) {\n\t\t\tconst tracker = disposables.add(trackFocus(ownerDocument.activeElement as HTMLElement));\n\t\t\tEvent.once(tracker.onDidBlur)(() => {\n\n\t\t\t\t// Ensure we are only updating the context key if we are\n\t\t\t\t// still in the same document that we are tracking. This\n\t\t\t\t// fixes a race condition in multi-window setups where\n\t\t\t\t// the blur event arrives in the inactive window overwriting\n\t\t\t\t// the context key of the active window. This is because\n\t\t\t\t// blur events from the focus tracker are emitted with a\n\t\t\t\t// timeout of 0.\n\n\t\t\t\tif (getActiveWindow().document === ownerDocument) {\n\t\t\t\t\tthis.inputFocusedContext.set(activeElementIsInput());\n\t\t\t\t}\n\n\t\t\t\ttracker.dispose();\n\t\t\t}, undefined, disposables);\n\t\t}\n\t}\n\n\tpublic getContextValuesContainer(contextId: number): Context {\n\t\tif (this._isDisposed) {\n\t\t\treturn NullContext.INSTANCE;\n\t\t}\n\t\treturn this._contexts.get(contextId) || NullContext.INSTANCE;\n\t}\n\n\tpublic createChildContext(parentContextId: number = this._myContextId): number {\n\t\tif (this._isDisposed) {\n\t\t\tthrow new Error(`ContextKeyService has been disposed`);\n\t\t}\n\t\tconst id = (++this._lastContextId);\n\t\tthis._contexts.set(id, new Context(id, this.getContextValuesContainer(parentContextId)));\n\t\treturn id;\n\t}\n\n\tpublic disposeContext(contextId: number): void {\n\t\tif (!this._isDisposed) {\n\t\t\tthis._contexts.delete(contextId);\n\t\t}\n\t}\n}\n\nclass ScopedContextKeyService extends AbstractContextKeyService {\n\n\tprivate _parent: AbstractContextKeyService;\n\tprivate _domNode: IContextKeyServiceTarget;\n\n\tprivate readonly _parentChangeListener = this._register(new MutableDisposable());\n\n\tconstructor(parent: AbstractContextKeyService, domNode: IContextKeyServiceTarget) {\n\t\tsuper(parent.createChildContext());\n\t\tthis._parent = parent;\n\t\tthis._updateParentChangeListener();\n\n\t\tthis._domNode = domNode;\n\t\tif (this._domNode.hasAttribute(KEYBINDING_CONTEXT_ATTR)) {\n\t\t\tlet extraInfo = '';\n\t\t\tif ((this._domNode as HTMLElement).classList) {\n\t\t\t\textraInfo = Array.from((this._domNode as HTMLElement).classList.values()).join(', ');\n\t\t\t}\n\n\t\t\tconsole.error(`Element already has context attribute${extraInfo ? ': ' + extraInfo : ''}`);\n\t\t}\n\t\tthis._domNode.setAttribute(KEYBINDING_CONTEXT_ATTR, String(this._myContextId));\n\t}\n\n\tprivate _updateParentChangeListener(): void {\n\t\t// Forward parent events to this listener. Parent will change.\n\t\tthis._parentChangeListener.value = this._parent.onDidChangeContext(e => {\n\t\t\tconst thisContainer = this._parent.getContextValuesContainer(this._myContextId);\n\t\t\tconst thisContextValues = thisContainer.value;\n\n\t\t\tif (!allEventKeysInContext(e, thisContextValues)) {\n\t\t\t\tthis._onDidChangeContext.fire(e);\n\t\t\t}\n\t\t});\n\t}\n\n\tpublic override dispose(): void {\n\t\tif (this._isDisposed) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._parent.disposeContext(this._myContextId);\n\t\tthis._domNode.removeAttribute(KEYBINDING_CONTEXT_ATTR);\n\t\tsuper.dispose();\n\t}\n\n\tpublic getContextValuesContainer(contextId: number): Context {\n\t\tif (this._isDisposed) {\n\t\t\treturn NullContext.INSTANCE;\n\t\t}\n\t\treturn this._parent.getContextValuesContainer(contextId);\n\t}\n\n\tpublic createChildContext(parentContextId: number = this._myContextId): number {\n\t\tif (this._isDisposed) {\n\t\t\tthrow new Error(`ScopedContextKeyService has been disposed`);\n\t\t}\n\t\treturn this._parent.createChildContext(parentContextId);\n\t}\n\n\tpublic disposeContext(contextId: number): void {\n\t\tif (this._isDisposed) {\n\t\t\treturn;\n\t\t}\n\t\tthis._parent.disposeContext(contextId);\n\t}\n}\n\nfunction findContextAttr(domNode: IContextKeyServiceTarget | null): number {\n\twhile (domNode) {\n\t\tif (domNode.hasAttribute(KEYBINDING_CONTEXT_ATTR)) {\n\t\t\tconst attr = domNode.getAttribute(KEYBINDING_CONTEXT_ATTR);\n\t\t\tif (attr) {\n\t\t\t\treturn parseInt(attr, 10);\n\t\t\t}\n\t\t\treturn NaN;\n\t\t}\n\t\tdomNode = domNode.parentElement;\n\t}\n\treturn 0;\n}\n\nexport function setContext(accessor: ServicesAccessor, contextKey: any, contextValue: any) {\n\tconst contextKeyService = accessor.get(IContextKeyService);\n\tcontextKeyService.createKey(String(contextKey), stringifyURIs(contextValue));\n}\n\nfunction stringifyURIs(contextValue: any): any {\n\treturn cloneAndChange(contextValue, (obj) => {\n\t\tif (typeof obj === 'object' && (<MarshalledObject>obj).$mid === MarshalledId.Uri) {\n\t\t\treturn URI.revive(obj).toString();\n\t\t}\n\t\tif (obj instanceof URI) {\n\t\t\treturn obj.toString();\n\t\t}\n\t\treturn undefined;\n\t});\n}\n\nCommandsRegistry.registerCommand('_setContext', setContext);\n\nCommandsRegistry.registerCommand({\n\tid: 'getContextKeyInfo',\n\thandler() {\n\t\treturn [...RawContextKey.all()].sort((a, b) => a.key.localeCompare(b.key));\n\t},\n\tmetadata: {\n\t\tdescription: localize('getContextKeyInfo', \"A command that returns information about context keys\"),\n\t\targs: []\n\t}\n});\n\nCommandsRegistry.registerCommand('_generateContextKeyInfo', function () {\n\tconst result: ContextKeyInfo[] = [];\n\tconst seen = new Set<string>();\n\tfor (const info of RawContextKey.all()) {\n\t\tif (!seen.has(info.key)) {\n\t\t\tseen.add(info.key);\n\t\t\tresult.push(info);\n\t\t}\n\t}\n\tresult.sort((a, b) => a.key.localeCompare(b.key));\n\tconsole.log(JSON.stringify(result, undefined, 2));\n});\n"]}
|
|
1
|
+
{"version":3,"sources":["vs/platform/contextkey/browser/contextKeyService.ts"],"names":[],"mappings":"AAAA;;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C,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAClD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;AACnD,CAAC,CAAC,CAAC","file":"contextKeyService.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 { Emitter, Event, PauseableEmitter } from '../../../base/common/event.js';\nimport { Iterable } from '../../../base/common/iterator.js';\nimport { Disposable, DisposableStore, IDisposable, MutableDisposable } from '../../../base/common/lifecycle.js';\nimport { MarshalledObject } from '../../../base/common/marshalling.js';\nimport { MarshalledId } from '../../../base/common/marshallingIds.js';\nimport { cloneAndChange, equals } from '../../../base/common/objects.js';\nimport { TernarySearchTree } from '../../../base/common/ternarySearchTree.js';\nimport { URI } from '../../../base/common/uri.js';\nimport { localize } from '../../../nls.js';\nimport { CommandsRegistry } from '../../commands/common/commands.js';\nimport { ConfigurationTarget, IConfigurationService } from '../../configuration/common/configuration.js';\nimport { ContextKeyExpression, ContextKeyInfo, ContextKeyValue, IContext, IContextKey, IContextKeyChangeEvent, IContextKeyService, IContextKeyServiceTarget, IReadableSet, IScopedContextKeyService, RawContextKey } from '../common/contextkey.js';\nimport { ServicesAccessor } from '../../instantiation/common/instantiation.js';\nimport { InputFocusedContext } from '../common/contextkeys.js';\nimport { mainWindow } from '../../../base/browser/window.js';\nimport { addDisposableListener, EventType, getActiveWindow, isEditableElement, onDidRegisterWindow, trackFocus } from '../../../base/browser/dom.js';\n\nconst KEYBINDING_CONTEXT_ATTR = 'data-keybinding-context';\n\nexport class Context implements IContext {\n\n\tprotected _parent: Context | null;\n\tprotected _value: Record<string, any>;\n\tprotected _id: number;\n\n\tconstructor(id: number, parent: Context | null) {\n\t\tthis._id = id;\n\t\tthis._parent = parent;\n\t\tthis._value = Object.create(null);\n\t\tthis._value['_contextId'] = id;\n\t}\n\n\tpublic get value(): Record<string, any> {\n\t\treturn { ...this._value };\n\t}\n\n\tpublic setValue(key: string, value: any): boolean {\n\t\t// console.log('SET ' + key + ' = ' + value + ' ON ' + this._id);\n\t\tif (!equals(this._value[key], value)) {\n\t\t\tthis._value[key] = value;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tpublic removeValue(key: string): boolean {\n\t\t// console.log('REMOVE ' + key + ' FROM ' + this._id);\n\t\tif (key in this._value) {\n\t\t\tdelete this._value[key];\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tpublic getValue<T>(key: string): T | undefined {\n\t\tconst ret = this._value[key];\n\t\tif (typeof ret === 'undefined' && this._parent) {\n\t\t\treturn this._parent.getValue<T>(key);\n\t\t}\n\t\treturn ret;\n\t}\n}\n\nclass NullContext extends Context {\n\n\tstatic readonly INSTANCE = new NullContext();\n\n\tconstructor() {\n\t\tsuper(-1, null);\n\t}\n\n\tpublic override setValue(key: string, value: any): boolean {\n\t\treturn false;\n\t}\n\n\tpublic override removeValue(key: string): boolean {\n\t\treturn false;\n\t}\n\n\tpublic override getValue<T>(key: string): T | undefined {\n\t\treturn undefined;\n\t}\n}\n\nclass ConfigAwareContextValuesContainer extends Context {\n\tprivate static readonly _keyPrefix = 'config.';\n\n\tprivate readonly _values = TernarySearchTree.forConfigKeys<any>();\n\tprivate readonly _listener: IDisposable;\n\n\tconstructor(\n\t\tid: number,\n\t\tprivate readonly _configurationService: IConfigurationService,\n\t\temitter: Emitter<IContextKeyChangeEvent>\n\t) {\n\t\tsuper(id, null);\n\n\t\tthis._listener = this._configurationService.onDidChangeConfiguration(event => {\n\t\t\tif (event.source === ConfigurationTarget.DEFAULT) {\n\t\t\t\t// new setting, reset everything\n\t\t\t\tconst allKeys = Array.from(this._values, ([k]) => k);\n\t\t\t\tthis._values.clear();\n\t\t\t\temitter.fire(new ArrayContextKeyChangeEvent(allKeys));\n\t\t\t} else {\n\t\t\t\tconst changedKeys: string[] = [];\n\t\t\t\tfor (const configKey of event.affectedKeys) {\n\t\t\t\t\tconst contextKey = `config.${configKey}`;\n\n\t\t\t\t\tconst cachedItems = this._values.findSuperstr(contextKey);\n\t\t\t\t\tif (cachedItems !== undefined) {\n\t\t\t\t\t\tchangedKeys.push(...Iterable.map(cachedItems, ([key]) => key));\n\t\t\t\t\t\tthis._values.deleteSuperstr(contextKey);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (this._values.has(contextKey)) {\n\t\t\t\t\t\tchangedKeys.push(contextKey);\n\t\t\t\t\t\tthis._values.delete(contextKey);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\temitter.fire(new ArrayContextKeyChangeEvent(changedKeys));\n\t\t\t}\n\t\t});\n\t}\n\n\tdispose(): void {\n\t\tthis._listener.dispose();\n\t}\n\n\toverride getValue(key: string): any {\n\n\t\tif (key.indexOf(ConfigAwareContextValuesContainer._keyPrefix) !== 0) {\n\t\t\treturn super.getValue(key);\n\t\t}\n\n\t\tif (this._values.has(key)) {\n\t\t\treturn this._values.get(key);\n\t\t}\n\n\t\tconst configKey = key.substr(ConfigAwareContextValuesContainer._keyPrefix.length);\n\t\tconst configValue = this._configurationService.getValue(configKey);\n\t\tlet value: any = undefined;\n\t\tswitch (typeof configValue) {\n\t\t\tcase 'number':\n\t\t\tcase 'boolean':\n\t\t\tcase 'string':\n\t\t\t\tvalue = configValue;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif (Array.isArray(configValue)) {\n\t\t\t\t\tvalue = JSON.stringify(configValue);\n\t\t\t\t} else {\n\t\t\t\t\tvalue = configValue;\n\t\t\t\t}\n\t\t}\n\n\t\tthis._values.set(key, value);\n\t\treturn value;\n\t}\n\n\toverride setValue(key: string, value: any): boolean {\n\t\treturn super.setValue(key, value);\n\t}\n\n\toverride removeValue(key: string): boolean {\n\t\treturn super.removeValue(key);\n\t}\n}\n\nclass ContextKey<T extends ContextKeyValue> implements IContextKey<T> {\n\n\tprivate _service: AbstractContextKeyService;\n\tprivate _key: string;\n\tprivate _defaultValue: T | undefined;\n\n\tconstructor(service: AbstractContextKeyService, key: string, defaultValue: T | undefined) {\n\t\tthis._service = service;\n\t\tthis._key = key;\n\t\tthis._defaultValue = defaultValue;\n\t\tthis.reset();\n\t}\n\n\tpublic set(value: T): void {\n\t\tthis._service.setContext(this._key, value);\n\t}\n\n\tpublic reset(): void {\n\t\tif (typeof this._defaultValue === 'undefined') {\n\t\t\tthis._service.removeContext(this._key);\n\t\t} else {\n\t\t\tthis._service.setContext(this._key, this._defaultValue);\n\t\t}\n\t}\n\n\tpublic get(): T | undefined {\n\t\treturn this._service.getContextKeyValue<T>(this._key);\n\t}\n}\n\nclass SimpleContextKeyChangeEvent implements IContextKeyChangeEvent {\n\tconstructor(readonly key: string) { }\n\taffectsSome(keys: IReadableSet<string>): boolean {\n\t\treturn keys.has(this.key);\n\t}\n\tallKeysContainedIn(keys: IReadableSet<string>): boolean {\n\t\treturn this.affectsSome(keys);\n\t}\n}\n\nclass ArrayContextKeyChangeEvent implements IContextKeyChangeEvent {\n\tconstructor(readonly keys: string[]) { }\n\taffectsSome(keys: IReadableSet<string>): boolean {\n\t\tfor (const key of this.keys) {\n\t\t\tif (keys.has(key)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\tallKeysContainedIn(keys: IReadableSet<string>): boolean {\n\t\treturn this.keys.every(key => keys.has(key));\n\t}\n}\n\nclass CompositeContextKeyChangeEvent implements IContextKeyChangeEvent {\n\tconstructor(readonly events: IContextKeyChangeEvent[]) { }\n\taffectsSome(keys: IReadableSet<string>): boolean {\n\t\tfor (const e of this.events) {\n\t\t\tif (e.affectsSome(keys)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\tallKeysContainedIn(keys: IReadableSet<string>): boolean {\n\t\treturn this.events.every(evt => evt.allKeysContainedIn(keys));\n\t}\n}\n\nfunction allEventKeysInContext(event: IContextKeyChangeEvent, context: Record<string, any>): boolean {\n\treturn event.allKeysContainedIn(new Set(Object.keys(context)));\n}\n\nexport abstract class AbstractContextKeyService extends Disposable implements IContextKeyService {\n\tdeclare _serviceBrand: undefined;\n\n\tprotected _isDisposed: boolean;\n\tprotected _myContextId: number;\n\n\tprotected _onDidChangeContext = this._register(new PauseableEmitter<IContextKeyChangeEvent>({ merge: input => new CompositeContextKeyChangeEvent(input) }));\n\tget onDidChangeContext() { return this._onDidChangeContext.event; }\n\n\tconstructor(myContextId: number) {\n\t\tsuper();\n\t\tthis._isDisposed = false;\n\t\tthis._myContextId = myContextId;\n\t}\n\n\tpublic createKey<T extends ContextKeyValue>(key: string, defaultValue: T | undefined): IContextKey<T> {\n\t\tif (this._isDisposed) {\n\t\t\tthrow new Error(`AbstractContextKeyService has been disposed`);\n\t\t}\n\t\treturn new ContextKey(this, key, defaultValue);\n\t}\n\n\n\tbufferChangeEvents(callback: Function): void {\n\t\tthis._onDidChangeContext.pause();\n\t\ttry {\n\t\t\tcallback();\n\t\t} finally {\n\t\t\tthis._onDidChangeContext.resume();\n\t\t}\n\t}\n\n\tpublic createScoped(domNode: IContextKeyServiceTarget): IScopedContextKeyService {\n\t\tif (this._isDisposed) {\n\t\t\tthrow new Error(`AbstractContextKeyService has been disposed`);\n\t\t}\n\t\treturn new ScopedContextKeyService(this, domNode);\n\t}\n\n\tpublic contextMatchesRules(rules: ContextKeyExpression | undefined): boolean {\n\t\tif (this._isDisposed) {\n\t\t\tthrow new Error(`AbstractContextKeyService has been disposed`);\n\t\t}\n\t\tconst context = this.getContextValuesContainer(this._myContextId);\n\t\tconst result = (rules ? rules.evaluate(context) : true);\n\t\t// console.group(rules.serialize() + ' -> ' + result);\n\t\t// rules.keys().forEach(key => { console.log(key, ctx[key]); });\n\t\t// console.groupEnd();\n\t\treturn result;\n\t}\n\n\tpublic getContextKeyValue<T>(key: string): T | undefined {\n\t\tif (this._isDisposed) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn this.getContextValuesContainer(this._myContextId).getValue<T>(key);\n\t}\n\n\tpublic setContext(key: string, value: any): void {\n\t\tif (this._isDisposed) {\n\t\t\treturn;\n\t\t}\n\t\tconst myContext = this.getContextValuesContainer(this._myContextId);\n\t\tif (!myContext) {\n\t\t\treturn;\n\t\t}\n\t\tif (myContext.setValue(key, value)) {\n\t\t\tthis._onDidChangeContext.fire(new SimpleContextKeyChangeEvent(key));\n\t\t}\n\t}\n\n\tpublic removeContext(key: string): void {\n\t\tif (this._isDisposed) {\n\t\t\treturn;\n\t\t}\n\t\tif (this.getContextValuesContainer(this._myContextId).removeValue(key)) {\n\t\t\tthis._onDidChangeContext.fire(new SimpleContextKeyChangeEvent(key));\n\t\t}\n\t}\n\n\tpublic getContext(target: IContextKeyServiceTarget | null): IContext {\n\t\tif (this._isDisposed) {\n\t\t\treturn NullContext.INSTANCE;\n\t\t}\n\t\treturn this.getContextValuesContainer(findContextAttr(target));\n\t}\n\n\tpublic abstract getContextValuesContainer(contextId: number): Context;\n\tpublic abstract createChildContext(parentContextId?: number): number;\n\tpublic abstract disposeContext(contextId: number): void;\n\n\tpublic override dispose(): void {\n\t\tsuper.dispose();\n\t\tthis._isDisposed = true;\n\t}\n}\n\nexport class ContextKeyService extends AbstractContextKeyService implements IContextKeyService {\n\n\tprivate _lastContextId: number;\n\tprivate readonly _contexts = new Map<number, Context>();\n\n\tprivate inputFocusedContext: IContextKey<boolean>;\n\n\tconstructor(@IConfigurationService configurationService: IConfigurationService) {\n\t\tsuper(0);\n\t\tthis._lastContextId = 0;\n\t\tthis.inputFocusedContext = InputFocusedContext.bindTo(this);\n\n\t\tconst myContext = this._register(new ConfigAwareContextValuesContainer(this._myContextId, configurationService, this._onDidChangeContext));\n\t\tthis._contexts.set(this._myContextId, myContext);\n\n\t\t// Uncomment this to see the contexts continuously logged\n\t\t// let lastLoggedValue: string | null = null;\n\t\t// setInterval(() => {\n\t\t// \tlet values = Object.keys(this._contexts).map((key) => this._contexts[key]);\n\t\t// \tlet logValue = values.map(v => JSON.stringify(v._value, null, '\\t')).join('\\n');\n\t\t// \tif (lastLoggedValue !== logValue) {\n\t\t// \t\tlastLoggedValue = logValue;\n\t\t// \t\tconsole.log(lastLoggedValue);\n\t\t// \t}\n\t\t// }, 2000);\n\n\t\tthis._register(Event.runAndSubscribe(onDidRegisterWindow, ({ window, disposables }) => {\n\t\t\tconst onFocusDisposables = disposables.add(new MutableDisposable<DisposableStore>());\n\t\t\tdisposables.add(addDisposableListener(window, EventType.FOCUS_IN, () => {\n\t\t\t\tonFocusDisposables.value = new DisposableStore();\n\t\t\t\tthis.updateInputContextKeys(window.document, onFocusDisposables.value);\n\t\t\t}, true));\n\t\t}, { window: mainWindow, disposables: this._store }));\n\t}\n\n\tprivate updateInputContextKeys(ownerDocument: Document, disposables: DisposableStore): void {\n\n\t\tfunction activeElementIsInput(): boolean {\n\t\t\treturn !!ownerDocument.activeElement && isEditableElement(ownerDocument.activeElement);\n\t\t}\n\n\t\tconst isInputFocused = activeElementIsInput();\n\t\tthis.inputFocusedContext.set(isInputFocused);\n\n\t\tif (isInputFocused) {\n\t\t\tconst tracker = disposables.add(trackFocus(ownerDocument.activeElement as HTMLElement));\n\t\t\tEvent.once(tracker.onDidBlur)(() => {\n\n\t\t\t\t// Ensure we are only updating the context key if we are\n\t\t\t\t// still in the same document that we are tracking. This\n\t\t\t\t// fixes a race condition in multi-window setups where\n\t\t\t\t// the blur event arrives in the inactive window overwriting\n\t\t\t\t// the context key of the active window. This is because\n\t\t\t\t// blur events from the focus tracker are emitted with a\n\t\t\t\t// timeout of 0.\n\n\t\t\t\tif (getActiveWindow().document === ownerDocument) {\n\t\t\t\t\tthis.inputFocusedContext.set(activeElementIsInput());\n\t\t\t\t}\n\n\t\t\t\ttracker.dispose();\n\t\t\t}, undefined, disposables);\n\t\t}\n\t}\n\n\tpublic getContextValuesContainer(contextId: number): Context {\n\t\tif (this._isDisposed) {\n\t\t\treturn NullContext.INSTANCE;\n\t\t}\n\t\treturn this._contexts.get(contextId) || NullContext.INSTANCE;\n\t}\n\n\tpublic createChildContext(parentContextId: number = this._myContextId): number {\n\t\tif (this._isDisposed) {\n\t\t\tthrow new Error(`ContextKeyService has been disposed`);\n\t\t}\n\t\tconst id = (++this._lastContextId);\n\t\tthis._contexts.set(id, new Context(id, this.getContextValuesContainer(parentContextId)));\n\t\treturn id;\n\t}\n\n\tpublic disposeContext(contextId: number): void {\n\t\tif (!this._isDisposed) {\n\t\t\tthis._contexts.delete(contextId);\n\t\t}\n\t}\n}\n\nclass ScopedContextKeyService extends AbstractContextKeyService {\n\n\tprivate _parent: AbstractContextKeyService;\n\tprivate _domNode: IContextKeyServiceTarget;\n\n\tprivate readonly _parentChangeListener = this._register(new MutableDisposable());\n\n\tconstructor(parent: AbstractContextKeyService, domNode: IContextKeyServiceTarget) {\n\t\tsuper(parent.createChildContext());\n\t\tthis._parent = parent;\n\t\tthis._updateParentChangeListener();\n\n\t\tthis._domNode = domNode;\n\t\tif (this._domNode.hasAttribute(KEYBINDING_CONTEXT_ATTR)) {\n\t\t\tlet extraInfo = '';\n\t\t\tif ((this._domNode as HTMLElement).classList) {\n\t\t\t\textraInfo = Array.from((this._domNode as HTMLElement).classList.values()).join(', ');\n\t\t\t}\n\n\t\t\tconsole.error(`Element already has context attribute${extraInfo ? ': ' + extraInfo : ''}`);\n\t\t}\n\t\tthis._domNode.setAttribute(KEYBINDING_CONTEXT_ATTR, String(this._myContextId));\n\t}\n\n\tprivate _updateParentChangeListener(): void {\n\t\t// Forward parent events to this listener. Parent will change.\n\t\tthis._parentChangeListener.value = this._parent.onDidChangeContext(e => {\n\t\t\tconst thisContainer = this._parent.getContextValuesContainer(this._myContextId);\n\t\t\tconst thisContextValues = thisContainer.value;\n\n\t\t\tif (!allEventKeysInContext(e, thisContextValues)) {\n\t\t\t\tthis._onDidChangeContext.fire(e);\n\t\t\t}\n\t\t});\n\t}\n\n\tpublic override dispose(): void {\n\t\tif (this._isDisposed) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._parent.disposeContext(this._myContextId);\n\t\tthis._domNode.removeAttribute(KEYBINDING_CONTEXT_ATTR);\n\t\tsuper.dispose();\n\t}\n\n\tpublic getContextValuesContainer(contextId: number): Context {\n\t\tif (this._isDisposed) {\n\t\t\treturn NullContext.INSTANCE;\n\t\t}\n\t\treturn this._parent.getContextValuesContainer(contextId);\n\t}\n\n\tpublic createChildContext(parentContextId: number = this._myContextId): number {\n\t\tif (this._isDisposed) {\n\t\t\tthrow new Error(`ScopedContextKeyService has been disposed`);\n\t\t}\n\t\treturn this._parent.createChildContext(parentContextId);\n\t}\n\n\tpublic disposeContext(contextId: number): void {\n\t\tif (this._isDisposed) {\n\t\t\treturn;\n\t\t}\n\t\tthis._parent.disposeContext(contextId);\n\t}\n}\n\nfunction findContextAttr(domNode: IContextKeyServiceTarget | null): number {\n\twhile (domNode) {\n\t\tif (domNode.hasAttribute(KEYBINDING_CONTEXT_ATTR)) {\n\t\t\tconst attr = domNode.getAttribute(KEYBINDING_CONTEXT_ATTR);\n\t\t\tif (attr) {\n\t\t\t\treturn parseInt(attr, 10);\n\t\t\t}\n\t\t\treturn NaN;\n\t\t}\n\t\tdomNode = domNode.parentElement;\n\t}\n\treturn 0;\n}\n\nexport function setContext(accessor: ServicesAccessor, contextKey: any, contextValue: any) {\n\tconst contextKeyService = accessor.get(IContextKeyService);\n\tcontextKeyService.createKey(String(contextKey), stringifyURIs(contextValue));\n}\n\nfunction stringifyURIs(contextValue: any): any {\n\treturn cloneAndChange(contextValue, (obj) => {\n\t\tif (typeof obj === 'object' && (<MarshalledObject>obj).$mid === MarshalledId.Uri) {\n\t\t\treturn URI.revive(obj).toString();\n\t\t}\n\t\tif (obj instanceof URI) {\n\t\t\treturn obj.toString();\n\t\t}\n\t\treturn undefined;\n\t});\n}\n\nCommandsRegistry.registerCommand('_setContext', setContext);\n\nCommandsRegistry.registerCommand({\n\tid: 'getContextKeyInfo',\n\thandler() {\n\t\treturn [...RawContextKey.all()].sort((a, b) => a.key.localeCompare(b.key));\n\t},\n\tmetadata: {\n\t\tdescription: localize('getContextKeyInfo', \"A command that returns information about context keys\"),\n\t\targs: []\n\t}\n});\n\nCommandsRegistry.registerCommand('_generateContextKeyInfo', function () {\n\tconst result: ContextKeyInfo[] = [];\n\tconst seen = new Set<string>();\n\tfor (const info of RawContextKey.all()) {\n\t\tif (!seen.has(info.key)) {\n\t\t\tseen.add(info.key);\n\t\t\tresult.push(info);\n\t\t}\n\t}\n\tresult.sort((a, b) => a.key.localeCompare(b.key));\n\tconsole.log(JSON.stringify(result, undefined, 2));\n});\n"]}
|
|
@@ -23,14 +23,14 @@ const hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
|
23
23
|
const defaultConfig = {
|
|
24
24
|
regexParsingWithErrorRecovery: true
|
|
25
25
|
};
|
|
26
|
-
const errorEmptyString = localize(
|
|
27
|
-
const hintEmptyString = localize(
|
|
28
|
-
const errorNoInAfterNot = localize(
|
|
29
|
-
const errorClosingParenthesis = localize(
|
|
30
|
-
const errorUnexpectedToken = localize(
|
|
31
|
-
const hintUnexpectedToken = localize(
|
|
32
|
-
const errorUnexpectedEOF = localize(
|
|
33
|
-
const hintUnexpectedEOF = localize(
|
|
26
|
+
const errorEmptyString = localize(1682, "Empty context key expression");
|
|
27
|
+
const hintEmptyString = localize(1683, "Did you forget to write an expression? You can also put 'false' or 'true' to always evaluate to false or true, respectively.");
|
|
28
|
+
const errorNoInAfterNot = localize(1684, "'in' after 'not'.");
|
|
29
|
+
const errorClosingParenthesis = localize(1685, "closing parenthesis ')'");
|
|
30
|
+
const errorUnexpectedToken = localize(1686, "Unexpected token");
|
|
31
|
+
const hintUnexpectedToken = localize(1687, "Did you forget to put && or || before the token?");
|
|
32
|
+
const errorUnexpectedEOF = localize(1688, "Unexpected end of expression");
|
|
33
|
+
const hintUnexpectedEOF = localize(1689, "Did you forget to put a context key?");
|
|
34
34
|
/**
|
|
35
35
|
* A parser for context key expressions.
|
|
36
36
|
*
|
|
@@ -375,7 +375,7 @@ export class Parser {
|
|
|
375
375
|
throw this._errExpectedButGot(message, this._peek());
|
|
376
376
|
}
|
|
377
377
|
_errExpectedButGot(expected, got, additionalInfo) {
|
|
378
|
-
const message = localize(
|
|
378
|
+
const message = localize(1690, "Expected: {0}\nReceived: '{1}'.", expected, Scanner.getLexeme(got));
|
|
379
379
|
const offset = got.offset;
|
|
380
380
|
const lexeme = Scanner.getLexeme(got);
|
|
381
381
|
this._parsingErrors.push({ message, offset, lexeme, additionalInfo });
|
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
import { isIOS, isLinux, isMacintosh, isMobile, isWeb, isWindows } from '../../../base/common/platform.js';
|
|
6
6
|
import { localize } from '../../../nls.js';
|
|
7
7
|
import { RawContextKey } from './contextkey.js';
|
|
8
|
-
export const IsMacContext = new RawContextKey('isMac', isMacintosh, localize(
|
|
9
|
-
export const IsLinuxContext = new RawContextKey('isLinux', isLinux, localize(
|
|
10
|
-
export const IsWindowsContext = new RawContextKey('isWindows', isWindows, localize(
|
|
11
|
-
export const IsWebContext = new RawContextKey('isWeb', isWeb, localize(
|
|
12
|
-
export const IsMacNativeContext = new RawContextKey('isMacNative', isMacintosh && !isWeb, localize(
|
|
13
|
-
export const IsIOSContext = new RawContextKey('isIOS', isIOS, localize(
|
|
14
|
-
export const IsMobileContext = new RawContextKey('isMobile', isMobile, localize(
|
|
8
|
+
export const IsMacContext = new RawContextKey('isMac', isMacintosh, localize(1691, "Whether the operating system is macOS"));
|
|
9
|
+
export const IsLinuxContext = new RawContextKey('isLinux', isLinux, localize(1692, "Whether the operating system is Linux"));
|
|
10
|
+
export const IsWindowsContext = new RawContextKey('isWindows', isWindows, localize(1693, "Whether the operating system is Windows"));
|
|
11
|
+
export const IsWebContext = new RawContextKey('isWeb', isWeb, localize(1694, "Whether the platform is a web browser"));
|
|
12
|
+
export const IsMacNativeContext = new RawContextKey('isMacNative', isMacintosh && !isWeb, localize(1695, "Whether the operating system is macOS on a non-browser platform"));
|
|
13
|
+
export const IsIOSContext = new RawContextKey('isIOS', isIOS, localize(1696, "Whether the operating system is iOS"));
|
|
14
|
+
export const IsMobileContext = new RawContextKey('isMobile', isMobile, localize(1697, "Whether the platform is a mobile web browser"));
|
|
15
15
|
export const IsDevelopmentContext = new RawContextKey('isDevelopment', false, true);
|
|
16
|
-
export const ProductQualityContext = new RawContextKey('productQualityType', '', localize(
|
|
16
|
+
export const ProductQualityContext = new RawContextKey('productQualityType', '', localize(1698, "Quality type of VS Code"));
|
|
17
17
|
export const InputFocusedContextKey = 'inputFocus';
|
|
18
|
-
export const InputFocusedContext = new RawContextKey(InputFocusedContextKey, false, localize(
|
|
18
|
+
export const InputFocusedContext = new RawContextKey(InputFocusedContextKey, false, localize(1699, "Whether keyboard focus is inside an input box"));
|
|
19
19
|
//# sourceMappingURL=contextkeys.js.map
|
|
@@ -7,17 +7,17 @@ import { localize } from '../../../nls.js';
|
|
|
7
7
|
function hintDidYouMean(...meant) {
|
|
8
8
|
switch (meant.length) {
|
|
9
9
|
case 1:
|
|
10
|
-
return localize(
|
|
10
|
+
return localize(1700, "Did you mean {0}?", meant[0]);
|
|
11
11
|
case 2:
|
|
12
|
-
return localize(
|
|
12
|
+
return localize(1701, "Did you mean {0} or {1}?", meant[0], meant[1]);
|
|
13
13
|
case 3:
|
|
14
|
-
return localize(
|
|
14
|
+
return localize(1702, "Did you mean {0}, {1} or {2}?", meant[0], meant[1], meant[2]);
|
|
15
15
|
default: // we just don't expect that many
|
|
16
16
|
return undefined;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
const hintDidYouForgetToOpenOrCloseQuote = localize(
|
|
20
|
-
const hintDidYouForgetToEscapeSlash = localize(
|
|
19
|
+
const hintDidYouForgetToOpenOrCloseQuote = localize(1703, "Did you forget to open or close the quote?");
|
|
20
|
+
const hintDidYouForgetToEscapeSlash = localize(1704, "Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\/\'.");
|
|
21
21
|
/**
|
|
22
22
|
* A simple scanner for context keys.
|
|
23
23
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/platform/contextview/browser/contextViewService.ts","vs/platform/contextview/browser/contextViewService.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAE,WAAW,EAAgD,MAAM,qDAAqD,CAAC;AAChI,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAEvE,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAElD,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,UAAU;IAKjD,YACkC,aAA6B;QAE9D,KAAK,EAAE,CAAC;QAFyB,kBAAa,GAAb,aAAa,CAAgB;QAI9D,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,aAAa,CAAC,aAAa,0CAAkC,CAAC,CAAC;QAEtH,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,oBAAoB,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IACzE,CAAC;IAED,cAAc;IAEd,eAAe,CAAC,QAA8B,EAAE,SAAuB,EAAE,UAAoB;QAC5F,IAAI,WAAmC,CAAC;QACxC,IAAI,SAAS,EAAE,CAAC;YACf,IAAI,SAAS,KAAK,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC;gBACzE,WAAW,0CAAkC,CAAC;YAC/C,CAAC;iBAAM,IAAI,UAAU,EAAE,CAAC;gBACvB,WAAW,8CAAsC,CAAC;YACnD,CAAC;iBAAM,CAAC;gBACP,WAAW,uCAA+B,CAAC;YAC5C,CAAC;QACF,CAAC;aAAM,CAAC;YACP,WAAW,0CAAkC,CAAC;QAC/C,CAAC;QAED,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,SAAS,IAAI,IAAI,CAAC,aAAa,CAAC,eAAe,EAAE,WAAW,CAAC,CAAC;QAE5F,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAEhC,MAAM,eAAe,GAAqB;YACzC,KAAK,EAAE,GAAG,EAAE;gBACX,IAAI,IAAI,CAAC,eAAe,KAAK,eAAe,EAAE,CAAC;oBAC9C,IAAI,CAAC,eAAe,EAAE,CAAC;gBACxB,CAAC;YACF,CAAC;SACD,CAAC;QAEF,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,OAAO,eAAe,CAAC;IACxB,CAAC;IAED,MAAM;QACL,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;IAC3B,CAAC;IAED,eAAe,CAAC,
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/platform/contextview/browser/contextViewService.ts","vs/platform/contextview/browser/contextViewService.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAE,WAAW,EAAgD,MAAM,qDAAqD,CAAC;AAChI,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAEvE,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAElD,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,UAAU;IAKjD,YACkC,aAA6B;QAE9D,KAAK,EAAE,CAAC;QAFyB,kBAAa,GAAb,aAAa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;IAC3B,CAAC;IAED,eAAe,CAAC,IAAc;QAC7B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5B,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC;IAClC,CAAC;CACD,CAAA;AAxDY,kBAAkB;IAM5B,WAAA,cAAc,CAAA;GANJ,kBAAkB,CAwD9B;;AAED,MAAM,OAAO,kBAAmB,SAAQ,kBAAkB;IAIzD,qBAAqB;QACpB,OAAO,IAAI,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC;IAC1C,CAAC;CACD","file":"contextViewService.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 { ContextView, ContextViewDOMPosition, IContextViewProvider } from '../../../base/browser/ui/contextview/contextview.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport { ILayoutService } from '../../layout/browser/layoutService.js';\nimport { IContextViewDelegate, IContextViewService, IOpenContextView } from './contextView.js';\nimport { getWindow } from '../../../base/browser/dom.js';\n\nexport class ContextViewHandler extends Disposable implements IContextViewProvider {\n\n\tprivate openContextView: IOpenContextView | undefined;\n\tprotected readonly contextView: ContextView;\n\n\tconstructor(\n\t\t@ILayoutService private readonly layoutService: ILayoutService\n\t) {\n\t\tsuper();\n\n\t\tthis.contextView = this._register(new ContextView(this.layoutService.mainContainer, ContextViewDOMPosition.ABSOLUTE));\n\n\t\tthis.layout();\n\t\tthis._register(layoutService.onDidLayoutContainer(() => this.layout()));\n\t}\n\n\t// ContextView\n\n\tshowContextView(delegate: IContextViewDelegate, container?: HTMLElement, shadowRoot?: boolean): IOpenContextView {\n\t\tlet domPosition: ContextViewDOMPosition;\n\t\tif (container) {\n\t\t\tif (container === this.layoutService.getContainer(getWindow(container))) {\n\t\t\t\tdomPosition = ContextViewDOMPosition.ABSOLUTE;\n\t\t\t} else if (shadowRoot) {\n\t\t\t\tdomPosition = ContextViewDOMPosition.FIXED_SHADOW;\n\t\t\t} else {\n\t\t\t\tdomPosition = ContextViewDOMPosition.FIXED;\n\t\t\t}\n\t\t} else {\n\t\t\tdomPosition = ContextViewDOMPosition.ABSOLUTE;\n\t\t}\n\n\t\tthis.contextView.setContainer(container ?? this.layoutService.activeContainer, domPosition);\n\n\t\tthis.contextView.show(delegate);\n\n\t\tconst openContextView: IOpenContextView = {\n\t\t\tclose: () => {\n\t\t\t\tif (this.openContextView === openContextView) {\n\t\t\t\t\tthis.hideContextView();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tthis.openContextView = openContextView;\n\t\treturn openContextView;\n\t}\n\n\tlayout(): void {\n\t\tthis.contextView.layout();\n\t}\n\n\thideContextView(data?: unknown): void {\n\t\tthis.contextView.hide(data);\n\t\tthis.openContextView = undefined;\n\t}\n}\n\nexport class ContextViewService extends ContextViewHandler implements IContextViewService {\n\n\tdeclare readonly _serviceBrand: undefined;\n\n\tgetContextViewElement(): HTMLElement {\n\t\treturn this.contextView.getViewElement();\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { ContextView, ContextViewDOMPosition, IContextViewProvider } from '../../../base/browser/ui/contextview/contextview.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport { ILayoutService } from '../../layout/browser/layoutService.js';\nimport { IContextViewDelegate, IContextViewService, IOpenContextView } from './contextView.js';\nimport { getWindow } from '../../../base/browser/dom.js';\n\nexport class ContextViewHandler extends Disposable implements IContextViewProvider {\n\n\tprivate openContextView: IOpenContextView | undefined;\n\tprotected readonly contextView: ContextView;\n\n\tconstructor(\n\t\t@ILayoutService private readonly layoutService: ILayoutService\n\t) {\n\t\tsuper();\n\n\t\tthis.contextView = this._register(new ContextView(this.layoutService.mainContainer, ContextViewDOMPosition.ABSOLUTE));\n\n\t\tthis.layout();\n\t\tthis._register(layoutService.onDidLayoutContainer(() => this.layout()));\n\t}\n\n\t// ContextView\n\n\tshowContextView(delegate: IContextViewDelegate, container?: HTMLElement, shadowRoot?: boolean): IOpenContextView {\n\t\tlet domPosition: ContextViewDOMPosition;\n\t\tif (container) {\n\t\t\tif (container === this.layoutService.getContainer(getWindow(container))) {\n\t\t\t\tdomPosition = ContextViewDOMPosition.ABSOLUTE;\n\t\t\t} else if (shadowRoot) {\n\t\t\t\tdomPosition = ContextViewDOMPosition.FIXED_SHADOW;\n\t\t\t} else {\n\t\t\t\tdomPosition = ContextViewDOMPosition.FIXED;\n\t\t\t}\n\t\t} else {\n\t\t\tdomPosition = ContextViewDOMPosition.ABSOLUTE;\n\t\t}\n\n\t\tthis.contextView.setContainer(container ?? this.layoutService.activeContainer, domPosition);\n\n\t\tthis.contextView.show(delegate);\n\n\t\tconst openContextView: IOpenContextView = {\n\t\t\tclose: () => {\n\t\t\t\tif (this.openContextView === openContextView) {\n\t\t\t\t\tthis.hideContextView();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tthis.openContextView = openContextView;\n\t\treturn openContextView;\n\t}\n\n\tlayout(): void {\n\t\tthis.contextView.layout();\n\t}\n\n\thideContextView(data?: unknown): void {\n\t\tthis.contextView.hide(data);\n\t\tthis.openContextView = undefined;\n\t}\n}\n\nexport class ContextViewService extends ContextViewHandler implements IContextViewService {\n\n\tdeclare readonly _serviceBrand: undefined;\n\n\tgetContextViewElement(): HTMLElement {\n\t\treturn this.contextView.getViewElement();\n\t}\n}\n"]}
|
|
@@ -18,7 +18,7 @@ import { KeybindingsRegistry } from '../../keybinding/common/keybindingsRegistry
|
|
|
18
18
|
import { localize } from '../../../nls.js';
|
|
19
19
|
import { DisposableStore, toDisposable } from '../../../base/common/lifecycle.js';
|
|
20
20
|
import { isActiveElement } from '../../../base/browser/dom.js';
|
|
21
|
-
export const historyNavigationVisible = new RawContextKey('suggestWidgetVisible', false, localize(
|
|
21
|
+
export const historyNavigationVisible = new RawContextKey('suggestWidgetVisible', false, localize(1705, "Whether suggestion are visible"));
|
|
22
22
|
const HistoryNavigationWidgetFocusContext = 'historyNavigationWidgetFocus';
|
|
23
23
|
const HistoryNavigationForwardsEnablementContext = 'historyNavigationForwardsEnabled';
|
|
24
24
|
const HistoryNavigationBackwardsEnablementContext = 'historyNavigationBackwardsEnabled';
|