monaco-editor-core 0.54.0 → 0.55.0-dev-20251008
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.messages.de.js +1 -1
- package/esm/nls.messages.es.js +1 -1
- package/esm/nls.messages.fr.js +1 -1
- package/esm/nls.messages.it.js +1 -1
- package/esm/nls.messages.ja.js +1 -1
- package/esm/nls.messages.ko.js +1 -1
- package/esm/nls.messages.ru.js +1 -1
- package/esm/nls.messages.zh-cn.js +1 -1
- package/esm/nls.messages.zh-tw.js +1 -1
- package/esm/vs/base/browser/canIUse.js +1 -0
- package/esm/vs/base/browser/canIUse.js.map +1 -1
- package/esm/vs/base/browser/dom.js +9 -0
- package/esm/vs/base/browser/dom.js.map +1 -1
- package/esm/vs/base/browser/fastDomNode.js.map +1 -1
- package/esm/vs/base/browser/mouseEvent.js +3 -0
- package/esm/vs/base/browser/mouseEvent.js.map +1 -1
- package/esm/vs/base/browser/trustedTypes.js +2 -0
- package/esm/vs/base/browser/trustedTypes.js.map +1 -1
- package/esm/vs/base/browser/ui/list/listWidget.js +5 -5
- package/esm/vs/base/browser/ui/list/listWidget.js.map +1 -1
- package/esm/vs/base/browser/ui/sash/sash.css +1 -1
- package/esm/vs/base/browser/ui/sash/sash.js +4 -0
- package/esm/vs/base/browser/ui/sash/sash.js.map +1 -1
- package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js +1 -1
- package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js.map +1 -1
- package/esm/vs/base/browser/ui/table/table.css +2 -2
- package/esm/vs/base/browser/ui/tree/abstractTree.js +5 -4
- package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/asyncDataTree.js +6 -4
- package/esm/vs/base/browser/ui/tree/asyncDataTree.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 +1 -1
- package/esm/vs/base/browser/ui/tree/indexTreeModel.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/media/tree.css +2 -2
- package/esm/vs/base/browser/ui/tree/objectTree.js.map +1 -1
- package/esm/vs/base/browser/webWorkerFactory.js +3 -0
- package/esm/vs/base/browser/webWorkerFactory.js.map +1 -1
- package/esm/vs/base/common/buffer.js.map +1 -1
- package/esm/vs/base/common/decorators.js +1 -0
- package/esm/vs/base/common/decorators.js.map +1 -1
- package/esm/vs/base/common/errors.js +1 -0
- package/esm/vs/base/common/errors.js.map +1 -1
- package/esm/vs/base/common/glob.js +1 -1
- package/esm/vs/base/common/glob.js.map +1 -1
- package/esm/vs/base/common/hash.js.map +1 -1
- package/esm/vs/base/common/hotReload.js +2 -0
- package/esm/vs/base/common/hotReload.js.map +1 -1
- package/esm/vs/base/common/hotReloadHelpers.js +1 -0
- package/esm/vs/base/common/hotReloadHelpers.js.map +1 -1
- package/esm/vs/base/common/lifecycle.js +19 -0
- package/esm/vs/base/common/lifecycle.js.map +1 -1
- package/esm/vs/base/common/map.js.map +1 -1
- package/esm/vs/base/common/marshalling.js +4 -0
- package/esm/vs/base/common/marshalling.js.map +1 -1
- package/esm/vs/base/common/network.js +1 -0
- package/esm/vs/base/common/network.js.map +1 -1
- package/esm/vs/base/common/normalization.js +39 -0
- package/esm/vs/base/common/normalization.js.map +1 -0
- package/esm/vs/base/common/objects.js +1 -0
- package/esm/vs/base/common/objects.js.map +1 -1
- package/esm/vs/base/common/observableInternal/changeTracker.js +4 -0
- package/esm/vs/base/common/observableInternal/changeTracker.js.map +1 -1
- package/esm/vs/base/common/observableInternal/debugLocation.js +1 -0
- package/esm/vs/base/common/observableInternal/debugLocation.js.map +1 -1
- package/esm/vs/base/common/observableInternal/debugName.js +1 -0
- package/esm/vs/base/common/observableInternal/debugName.js.map +1 -1
- package/esm/vs/base/common/observableInternal/logging/consoleObservableLogger.js +1 -0
- package/esm/vs/base/common/observableInternal/logging/consoleObservableLogger.js.map +1 -1
- package/esm/vs/base/common/observableInternal/logging/debugger/debuggerRpc.js +1 -0
- package/esm/vs/base/common/observableInternal/logging/debugger/debuggerRpc.js.map +1 -1
- package/esm/vs/base/common/observableInternal/logging/debugger/rpc.js +1 -0
- package/esm/vs/base/common/observableInternal/logging/debugger/rpc.js.map +1 -1
- package/esm/vs/base/common/observableInternal/observables/derived.js +7 -1
- package/esm/vs/base/common/observableInternal/observables/derived.js.map +1 -1
- package/esm/vs/base/common/observableInternal/observables/derivedImpl.js +2 -0
- package/esm/vs/base/common/observableInternal/observables/derivedImpl.js.map +1 -1
- package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js +1 -0
- package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js.map +1 -1
- package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js +1 -0
- package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js.map +1 -1
- package/esm/vs/base/common/process.js.map +1 -1
- package/esm/vs/base/common/product.js.map +1 -1
- package/esm/vs/base/common/types.js +2 -0
- package/esm/vs/base/common/types.js.map +1 -1
- package/esm/vs/base/common/worker/webWorker.js +26 -14
- package/esm/vs/base/common/worker/webWorker.js.map +1 -1
- package/esm/vs/base/parts/sandbox/common/sandboxTypes.js +2 -0
- package/esm/vs/base/parts/sandbox/common/sandboxTypes.js.map +1 -0
- package/esm/vs/editor/browser/config/editorConfiguration.js +3 -2
- package/esm/vs/editor/browser/config/editorConfiguration.js.map +1 -1
- package/esm/vs/editor/browser/config/migrateOptions.js +1 -1
- package/esm/vs/editor/browser/config/migrateOptions.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/native/editContextFactory.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.js +2 -0
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.js.map +1 -1
- package/esm/vs/editor/browser/controller/mouseHandler.js +2 -1
- package/esm/vs/editor/browser/controller/mouseHandler.js.map +1 -1
- package/esm/vs/editor/browser/controller/mouseTarget.js +7 -0
- package/esm/vs/editor/browser/controller/mouseTarget.js.map +1 -1
- package/esm/vs/editor/browser/controller/pointerHandler.js.map +1 -1
- 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/editorDom.js.map +1 -1
- package/esm/vs/editor/browser/editorExtensions.js.map +1 -1
- package/esm/vs/editor/browser/gpu/gpuUtils.js +1 -0
- package/esm/vs/editor/browser/gpu/gpuUtils.js.map +1 -1
- package/esm/vs/editor/browser/gpu/viewGpuContext.js +1 -0
- package/esm/vs/editor/browser/gpu/viewGpuContext.js.map +1 -1
- package/esm/vs/editor/browser/services/abstractCodeEditorService.js.map +1 -1
- package/esm/vs/editor/browser/services/bulkEditService.js.map +1 -1
- package/esm/vs/editor/browser/services/codeEditorService.js.map +1 -1
- package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
- package/esm/vs/editor/browser/services/hoverService/hover.css +2 -0
- package/esm/vs/editor/browser/services/hoverService/hoverService.js.map +1 -1
- package/esm/vs/editor/browser/services/hoverService/hoverWidget.js +1 -1
- package/esm/vs/editor/browser/services/hoverService/hoverWidget.js.map +1 -1
- package/esm/vs/editor/browser/services/inlineCompletionsService.js +8 -8
- package/esm/vs/editor/browser/services/inlineCompletionsService.js.map +1 -1
- package/esm/vs/editor/browser/services/openerService.js.map +1 -1
- package/esm/vs/editor/browser/view/viewLayer.js +1 -1
- package/esm/vs/editor/browser/view/viewLayer.js.map +1 -1
- package/esm/vs/editor/browser/view.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +1 -0
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js +1 -0
- package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js.map +1 -1
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorContributions.js.map +1 -1
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +4 -1
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +1 -0
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/delegatingEditorImpl.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/diffEditorOptions.js +1 -0
- package/esm/vs/editor/browser/widget/diffEditor/diffEditorOptions.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +1 -0
- package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/utils.js +2 -0
- package/esm/vs/editor/browser/widget/diffEditor/utils.js.map +1 -1
- package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js +2 -0
- package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js.map +1 -1
- package/esm/vs/editor/common/config/editorOptions.js +122 -68
- package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
- package/esm/vs/editor/common/config/fontInfo.js +32 -16
- package/esm/vs/editor/common/config/fontInfo.js.map +1 -1
- package/esm/vs/editor/common/config/fontInfoFromSettings.js +16 -0
- package/esm/vs/editor/common/config/fontInfoFromSettings.js.map +1 -0
- package/esm/vs/editor/common/core/edits/edit.js +1 -0
- package/esm/vs/editor/common/core/edits/edit.js.map +1 -1
- package/esm/vs/editor/common/core/edits/stringEdit.js +2 -0
- package/esm/vs/editor/common/core/edits/stringEdit.js.map +1 -1
- package/esm/vs/editor/common/core/position.js +1 -1
- package/esm/vs/editor/common/core/position.js.map +1 -1
- package/esm/vs/editor/common/core/range.js +1 -1
- package/esm/vs/editor/common/core/range.js.map +1 -1
- package/esm/vs/editor/common/core/selection.js +1 -1
- package/esm/vs/editor/common/core/selection.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
- package/esm/vs/editor/common/editorCommon.js.map +1 -1
- package/esm/vs/editor/common/languages.js +1 -1
- package/esm/vs/editor/common/languages.js.map +1 -1
- package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js +14 -0
- package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js.map +1 -1
- package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet.js +2 -0
- package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet.js.map +1 -1
- package/esm/vs/editor/common/model/textModel.js +1 -1
- package/esm/vs/editor/common/model/textModel.js.map +1 -1
- package/esm/vs/editor/common/model.js +1 -1
- package/esm/vs/editor/common/model.js.map +1 -1
- package/esm/vs/editor/common/services/editorBaseApi.js.map +1 -1
- package/esm/vs/editor/common/services/editorWebWorker.js +1 -0
- package/esm/vs/editor/common/services/editorWebWorker.js.map +1 -1
- package/esm/vs/editor/common/services/editorWorkerHost.js.map +1 -1
- package/esm/vs/editor/common/services/modelService.js +14 -21
- package/esm/vs/editor/common/services/modelService.js.map +1 -1
- package/esm/vs/editor/common/textModelEditSource.js +2 -0
- package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +40 -1
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js.map +1 -1
- package/esm/vs/editor/common/viewModel/viewModelImpl.js +2 -1
- package/esm/vs/editor/common/viewModel/viewModelImpl.js.map +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js.map +1 -1
- package/esm/vs/editor/contrib/codelens/browser/codelensController.js +1 -1
- package/esm/vs/editor/contrib/codelens/browser/codelensController.js.map +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js +1 -0
- package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js.map +1 -1
- package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +1 -0
- package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js.map +1 -1
- package/esm/vs/editor/contrib/find/browser/findModel.js +1 -0
- package/esm/vs/editor/contrib/find/browser/findModel.js.map +1 -1
- package/esm/vs/editor/contrib/find/browser/findWidget.css +5 -5
- package/esm/vs/editor/contrib/folding/browser/folding.css +4 -4
- package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js.map +1 -1
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js.map +1 -1
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +30 -14
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +5 -3
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +56 -7
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/structuredLogger.js +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/structuredLogger.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +2 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js +2 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +27 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js.map +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js.map +1 -1
- package/esm/vs/editor/contrib/rename/browser/renameWidget.js.map +1 -1
- package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.css +2 -0
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +2 -0
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js.map +1 -1
- package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js.map +1 -1
- package/esm/vs/editor/editor.api.d.ts +8 -8
- package/esm/vs/editor/editor.api.js +4 -0
- package/esm/vs/editor/editor.api.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneCodeEditor.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneEditor.js +37 -0
- package/esm/vs/editor/standalone/browser/standaloneEditor.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneLanguages.js +37 -0
- package/esm/vs/editor/standalone/browser/standaloneLanguages.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneServices.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneWebWorker.js.map +1 -1
- package/esm/vs/editor/standalone/common/monarch/monarchCompile.js +3 -0
- package/esm/vs/editor/standalone/common/monarch/monarchCompile.js.map +1 -1
- package/esm/vs/platform/accessibility/browser/accessibilityService.js +2 -2
- package/esm/vs/platform/accessibility/browser/accessibilityService.js.map +1 -1
- package/esm/vs/platform/actions/common/actions.js.map +1 -1
- package/esm/vs/platform/commands/common/commands.js.map +1 -1
- package/esm/vs/platform/contextkey/common/contextkey.js +5 -0
- package/esm/vs/platform/contextkey/common/contextkey.js.map +1 -1
- package/esm/vs/platform/dataChannel/browser/forwardingTelemetryService.js +1 -1
- package/esm/vs/platform/dataChannel/browser/forwardingTelemetryService.js.map +1 -1
- package/esm/vs/platform/dnd/browser/dnd.js +1 -1
- package/esm/vs/platform/dnd/browser/dnd.js.map +1 -1
- package/esm/vs/platform/instantiation/common/descriptors.js.map +1 -1
- package/esm/vs/platform/instantiation/common/instantiation.js.map +1 -1
- package/esm/vs/platform/instantiation/common/instantiationService.js +1 -0
- package/esm/vs/platform/instantiation/common/instantiationService.js.map +1 -1
- package/esm/vs/platform/list/browser/listService.js +5 -0
- package/esm/vs/platform/list/browser/listService.js.map +1 -1
- package/esm/vs/platform/log/common/log.js.map +1 -1
- package/esm/vs/platform/log/common/logService.js.map +1 -1
- package/esm/vs/platform/observable/common/wrapInHotClass.js +2 -0
- package/esm/vs/platform/observable/common/wrapInHotClass.js.map +1 -1
- package/esm/vs/platform/observable/common/wrapInReloadableClass.js +3 -0
- package/esm/vs/platform/observable/common/wrapInReloadableClass.js.map +1 -1
- package/esm/vs/platform/product/common/product.js +68 -0
- package/esm/vs/platform/product/common/product.js.map +1 -0
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +26 -2
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInput.js +1 -1
- package/esm/vs/platform/quickinput/browser/quickInput.js.map +1 -1
- package/monaco.d.ts +8 -8
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/browser/widget/codeEditor/code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Aa,KAAK,aAAa,EAAE,CAAC;gBAC1C,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACnB,CAAC;QACF,CAAC;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IAEO,gBAAgB,CAAC,EAAU;QAClC,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACnC,IAAI,CAAC,IAAI,EAAE,CAAC;YACX,OAAO;QACR,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAEzB,IAAI,CAAC,IAAI,CAAC,qBAAqB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YAClD,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;QAC/E,CAAC;QAED,IAAI,CAAC;YACJ,MAAM,QAAQ,GAAG,IAAI,CAAC,qBAAqB,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;YACpF,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;YACvC,IAAI,OAAO,QAAQ,CAAC,gBAAgB,KAAK,UAAU,IAAI,IAAI,CAAC,aAAa,kDAA0C,EAAE,CAAC;gBACrH,OAAO,CAAC,IAAI,CAAC,wBAAwB,IAAI,CAAC,EAAE,kFAAkF,CAAC,CAAC;YACjI,CAAC;QACF,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACd,iBAAiB,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;IACF,CAAC;CACD","file":"codeEditorContributions.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 { getWindow, runWhenWindowIdle } from '../../../../base/browser/dom.js';\nimport { onUnexpectedError } from '../../../../base/common/errors.js';\nimport { Disposable, DisposableMap, IDisposable } from '../../../../base/common/lifecycle.js';\nimport { ICodeEditor } from '../../editorBrowser.js';\nimport { EditorContributionInstantiation, IEditorContributionDescription } from '../../editorExtensions.js';\nimport { IEditorContribution } from '../../../common/editorCommon.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\n\nexport class CodeEditorContributions extends Disposable {\n\n\tprivate _editor: ICodeEditor | null = null;\n\tprivate _instantiationService: IInstantiationService | null = null;\n\n\t/**\n\t * Contains all instantiated contributions.\n\t */\n\tprivate readonly _instances = this._register(new DisposableMap<string, IEditorContribution>());\n\t/**\n\t * Contains contributions which are not yet instantiated.\n\t */\n\tprivate readonly _pending = new Map<string, IEditorContributionDescription>();\n\t/**\n\t * Tracks which instantiation kinds are still left in `_pending`.\n\t */\n\tprivate readonly _finishedInstantiation: boolean[] = [];\n\n\tconstructor(\n\n\t) {\n\t\tsuper();\n\n\t\tthis._finishedInstantiation[EditorContributionInstantiation.Eager] = false;\n\t\tthis._finishedInstantiation[EditorContributionInstantiation.AfterFirstRender] = false;\n\t\tthis._finishedInstantiation[EditorContributionInstantiation.BeforeFirstInteraction] = false;\n\t\tthis._finishedInstantiation[EditorContributionInstantiation.Eventually] = false;\n\t}\n\n\tpublic initialize(editor: ICodeEditor, contributions: IEditorContributionDescription[], instantiationService: IInstantiationService) {\n\t\tthis._editor = editor;\n\t\tthis._instantiationService = instantiationService;\n\n\t\tfor (const desc of contributions) {\n\t\t\tif (this._pending.has(desc.id)) {\n\t\t\t\tonUnexpectedError(new Error(`Cannot have two contributions with the same id ${desc.id}`));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis._pending.set(desc.id, desc);\n\t\t}\n\n\t\tthis._instantiateSome(EditorContributionInstantiation.Eager);\n\n\t\t// AfterFirstRender\n\t\t// - these extensions will be instantiated at the latest 50ms after the first render.\n\t\t// - but if there is idle time, we will instantiate them sooner.\n\t\tthis._register(runWhenWindowIdle(getWindow(this._editor.getDomNode()), () => {\n\t\t\tthis._instantiateSome(EditorContributionInstantiation.AfterFirstRender);\n\t\t}));\n\n\t\t// BeforeFirstInteraction\n\t\t// - these extensions will be instantiated at the latest before a mouse or a keyboard event.\n\t\t// - but if there is idle time, we will instantiate them sooner.\n\t\tthis._register(runWhenWindowIdle(getWindow(this._editor.getDomNode()), () => {\n\t\t\tthis._instantiateSome(EditorContributionInstantiation.BeforeFirstInteraction);\n\t\t}));\n\n\t\t// Eventually\n\t\t// - these extensions will only be instantiated when there is idle time.\n\t\t// - since there is no guarantee that there will ever be idle time, we set a timeout of 5s here.\n\t\tthis._register(runWhenWindowIdle(getWindow(this._editor.getDomNode()), () => {\n\t\t\tthis._instantiateSome(EditorContributionInstantiation.Eventually);\n\t\t}, 5000));\n\t}\n\n\tpublic saveViewState(): { [key: string]: any } {\n\t\tconst contributionsState: { [key: string]: any } = {};\n\t\tfor (const [id, contribution] of this._instances) {\n\t\t\tif (typeof contribution.saveViewState === 'function') {\n\t\t\t\tcontributionsState[id] = contribution.saveViewState();\n\t\t\t}\n\t\t}\n\t\treturn contributionsState;\n\t}\n\n\tpublic restoreViewState(contributionsState: { [key: string]: any }): void {\n\t\tfor (const [id, contribution] of this._instances) {\n\t\t\tif (typeof contribution.restoreViewState === 'function') {\n\t\t\t\tcontribution.restoreViewState(contributionsState[id]);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic get(id: string): IEditorContribution | null {\n\t\tthis._instantiateById(id);\n\t\treturn this._instances.get(id) || null;\n\t}\n\n\tpublic onBeforeInteractionEvent(): void {\n\t\t// this method is called very often by the editor!\n\t\tthis._instantiateSome(EditorContributionInstantiation.BeforeFirstInteraction);\n\t}\n\n\tpublic onAfterModelAttached(): IDisposable {\n\t\treturn runWhenWindowIdle(getWindow(this._editor?.getDomNode()), () => {\n\t\t\tthis._instantiateSome(EditorContributionInstantiation.AfterFirstRender);\n\t\t}, 50);\n\t}\n\n\tprivate _instantiateSome(instantiation: EditorContributionInstantiation): void {\n\t\tif (this._finishedInstantiation[instantiation]) {\n\t\t\t// already done with this instantiation!\n\t\t\treturn;\n\t\t}\n\t\tthis._finishedInstantiation[instantiation] = true;\n\n\t\tconst contribs = this._findPendingContributionsByInstantiation(instantiation);\n\t\tfor (const contrib of contribs) {\n\t\t\tthis._instantiateById(contrib.id);\n\t\t}\n\t}\n\n\tprivate _findPendingContributionsByInstantiation(instantiation: EditorContributionInstantiation): readonly IEditorContributionDescription[] {\n\t\tconst result: IEditorContributionDescription[] = [];\n\t\tfor (const [, desc] of this._pending) {\n\t\t\tif (desc.instantiation === instantiation) {\n\t\t\t\tresult.push(desc);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate _instantiateById(id: string): void {\n\t\tconst desc = this._pending.get(id);\n\t\tif (!desc) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._pending.delete(id);\n\n\t\tif (!this._instantiationService || !this._editor) {\n\t\t\tthrow new Error(`Cannot instantiate contributions before being initialized!`);\n\t\t}\n\n\t\ttry {\n\t\t\tconst instance = this._instantiationService.createInstance(desc.ctor, this._editor);\n\t\t\tthis._instances.set(desc.id, instance);\n\t\t\tif (typeof instance.restoreViewState === 'function' && desc.instantiation !== EditorContributionInstantiation.Eager) {\n\t\t\t\tconsole.warn(`Editor contribution '${desc.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tonUnexpectedError(err);\n\t\t}\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 { getWindow, runWhenWindowIdle } from '../../../../base/browser/dom.js';\nimport { onUnexpectedError } from '../../../../base/common/errors.js';\nimport { Disposable, DisposableMap, IDisposable } from '../../../../base/common/lifecycle.js';\nimport { ICodeEditor } from '../../editorBrowser.js';\nimport { EditorContributionInstantiation, IEditorContributionDescription } from '../../editorExtensions.js';\nimport { IEditorContribution } from '../../../common/editorCommon.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\n\nexport class CodeEditorContributions extends Disposable {\n\n\tprivate _editor: ICodeEditor | null = null;\n\tprivate _instantiationService: IInstantiationService | null = null;\n\n\t/**\n\t * Contains all instantiated contributions.\n\t */\n\tprivate readonly _instances = this._register(new DisposableMap<string, IEditorContribution>());\n\t/**\n\t * Contains contributions which are not yet instantiated.\n\t */\n\tprivate readonly _pending = new Map<string, IEditorContributionDescription>();\n\t/**\n\t * Tracks which instantiation kinds are still left in `_pending`.\n\t */\n\tprivate readonly _finishedInstantiation: boolean[] = [];\n\n\tconstructor(\n\n\t) {\n\t\tsuper();\n\n\t\tthis._finishedInstantiation[EditorContributionInstantiation.Eager] = false;\n\t\tthis._finishedInstantiation[EditorContributionInstantiation.AfterFirstRender] = false;\n\t\tthis._finishedInstantiation[EditorContributionInstantiation.BeforeFirstInteraction] = false;\n\t\tthis._finishedInstantiation[EditorContributionInstantiation.Eventually] = false;\n\t}\n\n\tpublic initialize(editor: ICodeEditor, contributions: IEditorContributionDescription[], instantiationService: IInstantiationService) {\n\t\tthis._editor = editor;\n\t\tthis._instantiationService = instantiationService;\n\n\t\tfor (const desc of contributions) {\n\t\t\tif (this._pending.has(desc.id)) {\n\t\t\t\tonUnexpectedError(new Error(`Cannot have two contributions with the same id ${desc.id}`));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis._pending.set(desc.id, desc);\n\t\t}\n\n\t\tthis._instantiateSome(EditorContributionInstantiation.Eager);\n\n\t\t// AfterFirstRender\n\t\t// - these extensions will be instantiated at the latest 50ms after the first render.\n\t\t// - but if there is idle time, we will instantiate them sooner.\n\t\tthis._register(runWhenWindowIdle(getWindow(this._editor.getDomNode()), () => {\n\t\t\tthis._instantiateSome(EditorContributionInstantiation.AfterFirstRender);\n\t\t}));\n\n\t\t// BeforeFirstInteraction\n\t\t// - these extensions will be instantiated at the latest before a mouse or a keyboard event.\n\t\t// - but if there is idle time, we will instantiate them sooner.\n\t\tthis._register(runWhenWindowIdle(getWindow(this._editor.getDomNode()), () => {\n\t\t\tthis._instantiateSome(EditorContributionInstantiation.BeforeFirstInteraction);\n\t\t}));\n\n\t\t// Eventually\n\t\t// - these extensions will only be instantiated when there is idle time.\n\t\t// - since there is no guarantee that there will ever be idle time, we set a timeout of 5s here.\n\t\tthis._register(runWhenWindowIdle(getWindow(this._editor.getDomNode()), () => {\n\t\t\tthis._instantiateSome(EditorContributionInstantiation.Eventually);\n\t\t}, 5000));\n\t}\n\n\tpublic saveViewState(): { [key: string]: any } {\n\t\tconst contributionsState: { [key: string]: any } = {};\n\t\tfor (const [id, contribution] of this._instances) {\n\t\t\tif (typeof contribution.saveViewState === 'function') {\n\t\t\t\tcontributionsState[id] = contribution.saveViewState();\n\t\t\t}\n\t\t}\n\t\treturn contributionsState;\n\t}\n\n\tpublic restoreViewState(contributionsState: { [key: string]: any }): void {\n\t\tfor (const [id, contribution] of this._instances) {\n\t\t\tif (typeof contribution.restoreViewState === 'function') {\n\t\t\t\tcontribution.restoreViewState(contributionsState[id]);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic get(id: string): IEditorContribution | null {\n\t\tthis._instantiateById(id);\n\t\treturn this._instances.get(id) || null;\n\t}\n\n\tpublic onBeforeInteractionEvent(): void {\n\t\t// this method is called very often by the editor!\n\t\tthis._instantiateSome(EditorContributionInstantiation.BeforeFirstInteraction);\n\t}\n\n\tpublic onAfterModelAttached(): IDisposable {\n\t\treturn runWhenWindowIdle(getWindow(this._editor?.getDomNode()), () => {\n\t\t\tthis._instantiateSome(EditorContributionInstantiation.AfterFirstRender);\n\t\t}, 50);\n\t}\n\n\tprivate _instantiateSome(instantiation: EditorContributionInstantiation): void {\n\t\tif (this._finishedInstantiation[instantiation]) {\n\t\t\t// already done with this instantiation!\n\t\t\treturn;\n\t\t}\n\t\tthis._finishedInstantiation[instantiation] = true;\n\n\t\tconst contribs = this._findPendingContributionsByInstantiation(instantiation);\n\t\tfor (const contrib of contribs) {\n\t\t\tthis._instantiateById(contrib.id);\n\t\t}\n\t}\n\n\tprivate _findPendingContributionsByInstantiation(instantiation: EditorContributionInstantiation): readonly IEditorContributionDescription[] {\n\t\tconst result: IEditorContributionDescription[] = [];\n\t\tfor (const [, desc] of this._pending) {\n\t\t\tif (desc.instantiation === instantiation) {\n\t\t\t\tresult.push(desc);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate _instantiateById(id: string): void {\n\t\tconst desc = this._pending.get(id);\n\t\tif (!desc) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._pending.delete(id);\n\n\t\tif (!this._instantiationService || !this._editor) {\n\t\t\tthrow new Error(`Cannot instantiate contributions before being initialized!`);\n\t\t}\n\n\t\ttry {\n\t\t\tconst instance = this._instantiationService.createInstance(desc.ctor, this._editor);\n\t\t\tthis._instances.set(desc.id, instance);\n\t\t\tif (typeof instance.restoreViewState === 'function' && desc.instantiation !== EditorContributionInstantiation.Eager) {\n\t\t\t\tconsole.warn(`Editor contribution '${desc.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tonUnexpectedError(err);\n\t\t}\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/browser/widget/codeEditor/codeEditorContributions.ts","vs/editor/browser/widget/codeEditor/codeEditorContributions.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAe,MAAM,sCAAsC,CAAC;AAM9F,MAAM,OAAO,uBAAwB,SAAQ,UAAU;IAkBtD;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AAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAEzB,IAAI,CAAC,IAAI,CAAC,qBAAqB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YAClD,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;QAC/E,CAAC;QAED,IAAI,CAAC;YACJ,MAAM,QAAQ,GAAG,IAAI,CAAC,qBAAqB,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;YACpF,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;YACvC,IAAI,OAAO,QAAQ,CAAC,gBAAgB,KAAK,UAAU,IAAI,IAAI,CAAC,aAAa,kDAA0C,EAAE,CAAC;gBACrH,OAAO,CAAC,IAAI,CAAC,wBAAwB,IAAI,CAAC,EAAE,kFAAkF,CAAC,CAAC;YACjI,CAAC;QACF,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACd,iBAAiB,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;IACF,CAAC;CACD","file":"codeEditorContributions.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 { getWindow, runWhenWindowIdle } from '../../../../base/browser/dom.js';\nimport { onUnexpectedError } from '../../../../base/common/errors.js';\nimport { Disposable, DisposableMap, IDisposable } from '../../../../base/common/lifecycle.js';\nimport { ICodeEditor } from '../../editorBrowser.js';\nimport { EditorContributionInstantiation, IEditorContributionDescription } from '../../editorExtensions.js';\nimport { IEditorContribution } from '../../../common/editorCommon.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\n\nexport class CodeEditorContributions extends Disposable {\n\n\tprivate _editor: ICodeEditor | null = null;\n\tprivate _instantiationService: IInstantiationService | null = null;\n\n\t/**\n\t * Contains all instantiated contributions.\n\t */\n\tprivate readonly _instances = this._register(new DisposableMap<string, IEditorContribution>());\n\t/**\n\t * Contains contributions which are not yet instantiated.\n\t */\n\tprivate readonly _pending = new Map<string, IEditorContributionDescription>();\n\t/**\n\t * Tracks which instantiation kinds are still left in `_pending`.\n\t */\n\tprivate readonly _finishedInstantiation: boolean[] = [];\n\n\tconstructor(\n\n\t) {\n\t\tsuper();\n\n\t\tthis._finishedInstantiation[EditorContributionInstantiation.Eager] = false;\n\t\tthis._finishedInstantiation[EditorContributionInstantiation.AfterFirstRender] = false;\n\t\tthis._finishedInstantiation[EditorContributionInstantiation.BeforeFirstInteraction] = false;\n\t\tthis._finishedInstantiation[EditorContributionInstantiation.Eventually] = false;\n\t}\n\n\tpublic initialize(editor: ICodeEditor, contributions: IEditorContributionDescription[], instantiationService: IInstantiationService) {\n\t\tthis._editor = editor;\n\t\tthis._instantiationService = instantiationService;\n\n\t\tfor (const desc of contributions) {\n\t\t\tif (this._pending.has(desc.id)) {\n\t\t\t\tonUnexpectedError(new Error(`Cannot have two contributions with the same id ${desc.id}`));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis._pending.set(desc.id, desc);\n\t\t}\n\n\t\tthis._instantiateSome(EditorContributionInstantiation.Eager);\n\n\t\t// AfterFirstRender\n\t\t// - these extensions will be instantiated at the latest 50ms after the first render.\n\t\t// - but if there is idle time, we will instantiate them sooner.\n\t\tthis._register(runWhenWindowIdle(getWindow(this._editor.getDomNode()), () => {\n\t\t\tthis._instantiateSome(EditorContributionInstantiation.AfterFirstRender);\n\t\t}));\n\n\t\t// BeforeFirstInteraction\n\t\t// - these extensions will be instantiated at the latest before a mouse or a keyboard event.\n\t\t// - but if there is idle time, we will instantiate them sooner.\n\t\tthis._register(runWhenWindowIdle(getWindow(this._editor.getDomNode()), () => {\n\t\t\tthis._instantiateSome(EditorContributionInstantiation.BeforeFirstInteraction);\n\t\t}));\n\n\t\t// Eventually\n\t\t// - these extensions will only be instantiated when there is idle time.\n\t\t// - since there is no guarantee that there will ever be idle time, we set a timeout of 5s here.\n\t\tthis._register(runWhenWindowIdle(getWindow(this._editor.getDomNode()), () => {\n\t\t\tthis._instantiateSome(EditorContributionInstantiation.Eventually);\n\t\t}, 5000));\n\t}\n\n\tpublic saveViewState(): { [key: string]: unknown } {\n\t\tconst contributionsState: { [key: string]: unknown } = {};\n\t\tfor (const [id, contribution] of this._instances) {\n\t\t\tif (typeof contribution.saveViewState === 'function') {\n\t\t\t\tcontributionsState[id] = contribution.saveViewState();\n\t\t\t}\n\t\t}\n\t\treturn contributionsState;\n\t}\n\n\tpublic restoreViewState(contributionsState: { [key: string]: unknown }): void {\n\t\tfor (const [id, contribution] of this._instances) {\n\t\t\tif (typeof contribution.restoreViewState === 'function') {\n\t\t\t\tcontribution.restoreViewState(contributionsState[id]);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic get(id: string): IEditorContribution | null {\n\t\tthis._instantiateById(id);\n\t\treturn this._instances.get(id) || null;\n\t}\n\n\tpublic onBeforeInteractionEvent(): void {\n\t\t// this method is called very often by the editor!\n\t\tthis._instantiateSome(EditorContributionInstantiation.BeforeFirstInteraction);\n\t}\n\n\tpublic onAfterModelAttached(): IDisposable {\n\t\treturn runWhenWindowIdle(getWindow(this._editor?.getDomNode()), () => {\n\t\t\tthis._instantiateSome(EditorContributionInstantiation.AfterFirstRender);\n\t\t}, 50);\n\t}\n\n\tprivate _instantiateSome(instantiation: EditorContributionInstantiation): void {\n\t\tif (this._finishedInstantiation[instantiation]) {\n\t\t\t// already done with this instantiation!\n\t\t\treturn;\n\t\t}\n\t\tthis._finishedInstantiation[instantiation] = true;\n\n\t\tconst contribs = this._findPendingContributionsByInstantiation(instantiation);\n\t\tfor (const contrib of contribs) {\n\t\t\tthis._instantiateById(contrib.id);\n\t\t}\n\t}\n\n\tprivate _findPendingContributionsByInstantiation(instantiation: EditorContributionInstantiation): readonly IEditorContributionDescription[] {\n\t\tconst result: IEditorContributionDescription[] = [];\n\t\tfor (const [, desc] of this._pending) {\n\t\t\tif (desc.instantiation === instantiation) {\n\t\t\t\tresult.push(desc);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate _instantiateById(id: string): void {\n\t\tconst desc = this._pending.get(id);\n\t\tif (!desc) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._pending.delete(id);\n\n\t\tif (!this._instantiationService || !this._editor) {\n\t\t\tthrow new Error(`Cannot instantiate contributions before being initialized!`);\n\t\t}\n\n\t\ttry {\n\t\t\tconst instance = this._instantiationService.createInstance(desc.ctor, this._editor);\n\t\t\tthis._instances.set(desc.id, instance);\n\t\t\tif (typeof instance.restoreViewState === 'function' && desc.instantiation !== EditorContributionInstantiation.Eager) {\n\t\t\t\tconsole.warn(`Editor contribution '${desc.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tonUnexpectedError(err);\n\t\t}\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 { getWindow, runWhenWindowIdle } from '../../../../base/browser/dom.js';\nimport { onUnexpectedError } from '../../../../base/common/errors.js';\nimport { Disposable, DisposableMap, IDisposable } from '../../../../base/common/lifecycle.js';\nimport { ICodeEditor } from '../../editorBrowser.js';\nimport { EditorContributionInstantiation, IEditorContributionDescription } from '../../editorExtensions.js';\nimport { IEditorContribution } from '../../../common/editorCommon.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\n\nexport class CodeEditorContributions extends Disposable {\n\n\tprivate _editor: ICodeEditor | null = null;\n\tprivate _instantiationService: IInstantiationService | null = null;\n\n\t/**\n\t * Contains all instantiated contributions.\n\t */\n\tprivate readonly _instances = this._register(new DisposableMap<string, IEditorContribution>());\n\t/**\n\t * Contains contributions which are not yet instantiated.\n\t */\n\tprivate readonly _pending = new Map<string, IEditorContributionDescription>();\n\t/**\n\t * Tracks which instantiation kinds are still left in `_pending`.\n\t */\n\tprivate readonly _finishedInstantiation: boolean[] = [];\n\n\tconstructor(\n\n\t) {\n\t\tsuper();\n\n\t\tthis._finishedInstantiation[EditorContributionInstantiation.Eager] = false;\n\t\tthis._finishedInstantiation[EditorContributionInstantiation.AfterFirstRender] = false;\n\t\tthis._finishedInstantiation[EditorContributionInstantiation.BeforeFirstInteraction] = false;\n\t\tthis._finishedInstantiation[EditorContributionInstantiation.Eventually] = false;\n\t}\n\n\tpublic initialize(editor: ICodeEditor, contributions: IEditorContributionDescription[], instantiationService: IInstantiationService) {\n\t\tthis._editor = editor;\n\t\tthis._instantiationService = instantiationService;\n\n\t\tfor (const desc of contributions) {\n\t\t\tif (this._pending.has(desc.id)) {\n\t\t\t\tonUnexpectedError(new Error(`Cannot have two contributions with the same id ${desc.id}`));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis._pending.set(desc.id, desc);\n\t\t}\n\n\t\tthis._instantiateSome(EditorContributionInstantiation.Eager);\n\n\t\t// AfterFirstRender\n\t\t// - these extensions will be instantiated at the latest 50ms after the first render.\n\t\t// - but if there is idle time, we will instantiate them sooner.\n\t\tthis._register(runWhenWindowIdle(getWindow(this._editor.getDomNode()), () => {\n\t\t\tthis._instantiateSome(EditorContributionInstantiation.AfterFirstRender);\n\t\t}));\n\n\t\t// BeforeFirstInteraction\n\t\t// - these extensions will be instantiated at the latest before a mouse or a keyboard event.\n\t\t// - but if there is idle time, we will instantiate them sooner.\n\t\tthis._register(runWhenWindowIdle(getWindow(this._editor.getDomNode()), () => {\n\t\t\tthis._instantiateSome(EditorContributionInstantiation.BeforeFirstInteraction);\n\t\t}));\n\n\t\t// Eventually\n\t\t// - these extensions will only be instantiated when there is idle time.\n\t\t// - since there is no guarantee that there will ever be idle time, we set a timeout of 5s here.\n\t\tthis._register(runWhenWindowIdle(getWindow(this._editor.getDomNode()), () => {\n\t\t\tthis._instantiateSome(EditorContributionInstantiation.Eventually);\n\t\t}, 5000));\n\t}\n\n\tpublic saveViewState(): { [key: string]: unknown } {\n\t\tconst contributionsState: { [key: string]: unknown } = {};\n\t\tfor (const [id, contribution] of this._instances) {\n\t\t\tif (typeof contribution.saveViewState === 'function') {\n\t\t\t\tcontributionsState[id] = contribution.saveViewState();\n\t\t\t}\n\t\t}\n\t\treturn contributionsState;\n\t}\n\n\tpublic restoreViewState(contributionsState: { [key: string]: unknown }): void {\n\t\tfor (const [id, contribution] of this._instances) {\n\t\t\tif (typeof contribution.restoreViewState === 'function') {\n\t\t\t\tcontribution.restoreViewState(contributionsState[id]);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic get(id: string): IEditorContribution | null {\n\t\tthis._instantiateById(id);\n\t\treturn this._instances.get(id) || null;\n\t}\n\n\tpublic onBeforeInteractionEvent(): void {\n\t\t// this method is called very often by the editor!\n\t\tthis._instantiateSome(EditorContributionInstantiation.BeforeFirstInteraction);\n\t}\n\n\tpublic onAfterModelAttached(): IDisposable {\n\t\treturn runWhenWindowIdle(getWindow(this._editor?.getDomNode()), () => {\n\t\t\tthis._instantiateSome(EditorContributionInstantiation.AfterFirstRender);\n\t\t}, 50);\n\t}\n\n\tprivate _instantiateSome(instantiation: EditorContributionInstantiation): void {\n\t\tif (this._finishedInstantiation[instantiation]) {\n\t\t\t// already done with this instantiation!\n\t\t\treturn;\n\t\t}\n\t\tthis._finishedInstantiation[instantiation] = true;\n\n\t\tconst contribs = this._findPendingContributionsByInstantiation(instantiation);\n\t\tfor (const contrib of contribs) {\n\t\t\tthis._instantiateById(contrib.id);\n\t\t}\n\t}\n\n\tprivate _findPendingContributionsByInstantiation(instantiation: EditorContributionInstantiation): readonly IEditorContributionDescription[] {\n\t\tconst result: IEditorContributionDescription[] = [];\n\t\tfor (const [, desc] of this._pending) {\n\t\t\tif (desc.instantiation === instantiation) {\n\t\t\t\tresult.push(desc);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate _instantiateById(id: string): void {\n\t\tconst desc = this._pending.get(id);\n\t\tif (!desc) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._pending.delete(id);\n\n\t\tif (!this._instantiationService || !this._editor) {\n\t\t\tthrow new Error(`Cannot instantiate contributions before being initialized!`);\n\t\t}\n\n\t\ttry {\n\t\t\tconst instance = this._instantiationService.createInstance(desc.ctor, this._editor);\n\t\t\tthis._instances.set(desc.id, instance);\n\t\t\tif (typeof instance.restoreViewState === 'function' && desc.instantiation !== EditorContributionInstantiation.Eager) {\n\t\t\t\tconsole.warn(`Editor contribution '${desc.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tonUnexpectedError(err);\n\t\t}\n\t}\n}\n"]}
|
|
@@ -54,6 +54,7 @@ import { editorErrorForeground, editorHintForeground, editorInfoForeground, edit
|
|
|
54
54
|
import { IThemeService, registerThemingParticipant } from '../../../../platform/theme/common/themeService.js';
|
|
55
55
|
import { MenuId } from '../../../../platform/actions/common/actions.js';
|
|
56
56
|
import { TextModelEditSource, EditSources } from '../../../common/textModelEditSource.js';
|
|
57
|
+
import { isObject } from '../../../../base/common/types.js';
|
|
57
58
|
let CodeEditorWidget = class CodeEditorWidget extends Disposable {
|
|
58
59
|
static { CodeEditorWidget_1 = this; }
|
|
59
60
|
static { this.dropIntoEditorDecorationOptions = ModelDecorationOptions.register({
|
|
@@ -864,7 +865,9 @@ let CodeEditorWidget = class CodeEditorWidget extends Disposable {
|
|
|
864
865
|
const command = EditorExtensionsRegistry.getEditorCommand(handlerId);
|
|
865
866
|
if (command) {
|
|
866
867
|
payload = payload || {};
|
|
867
|
-
payload
|
|
868
|
+
if (isObject(payload)) {
|
|
869
|
+
payload.source = source;
|
|
870
|
+
}
|
|
868
871
|
this._instantiationService.invokeFunction((accessor) => {
|
|
869
872
|
Promise.resolve(command.runEditorCommand(accessor, this, payload)).then(undefined, onUnexpectedError);
|
|
870
873
|
});
|