From b8c6036346b6a8cb8459493ff61278878b73724c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Tue, 16 Jul 2024 10:42:27 +0200 Subject: [PATCH] refactor: homogenize syntax --- src/monaco.ts | 2 +- src/service-override/base.ts | 2 +- src/service-override/configuration.ts | 4 ++-- src/service-override/keybindings.ts | 2 +- src/service-override/model.ts | 2 +- src/service-override/notifications.ts | 2 +- src/service-override/output.ts | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/monaco.ts b/src/monaco.ts index 34ca56f5..8813fba8 100644 --- a/src/monaco.ts +++ b/src/monaco.ts @@ -343,7 +343,7 @@ let standaloneEditorInstantiationService: IInstantiationService | null = null function getStandaloneEditorInstantiationService (accessor: ServicesAccessor) { if (standaloneEditorInstantiationService == null) { const serviceCollection = new ServiceCollection() - serviceCollection.set(IQuickInputService, new SyncDescriptor(StandaloneQuickInputService, undefined, true)) + serviceCollection.set(IQuickInputService, new SyncDescriptor(StandaloneQuickInputService, [], true)) const keybindingService = accessor.get(IKeybindingService) if (!(keybindingService instanceof StandaloneKeybindingService) && isDynamicKeybindingService(keybindingService)) { serviceCollection.set(IKeybindingService, new SyncDescriptor(DelegateStandaloneKeybindingService, [keybindingService], true)) diff --git a/src/service-override/base.ts b/src/service-override/base.ts index cd9d8881..811cec64 100644 --- a/src/service-override/base.ts +++ b/src/service-override/base.ts @@ -58,6 +58,6 @@ export default function getServiceOverride (): IEditorOverrideServices { [IWorkingCopyFileService.toString()]: new SyncDescriptor(WorkingCopyFileService, [], false), [IPathService.toString()]: new SyncDescriptor(BrowserPathServiceOverride, [], true), [ITrustedDomainService.toString()]: new SyncDescriptor(TrustedDomainService, [], true), - [ILabelService.toString()]: new SyncDescriptor(LabelService, undefined, true) + [ILabelService.toString()]: new SyncDescriptor(LabelService, [], true) } } diff --git a/src/service-override/configuration.ts b/src/service-override/configuration.ts index 251a1240..e839b114 100644 --- a/src/service-override/configuration.ts +++ b/src/service-override/configuration.ts @@ -155,8 +155,8 @@ function getServiceOverride (defaultWorkspace?: URI | IAnyWorkspaceIdentifier): [IWorkspaceContextService.toString()]: new SyncDescriptor(MemoizedInjectedConfigurationService, [], true), [ITextResourceConfigurationService.toString()]: new SyncDescriptor(TextResourceConfigurationService, [], true), [IWorkspaceEditingService.toString()]: new SyncDescriptor(MonacoWorkspaceEditingService, [], true), - [IWorkspacesService.toString()]: new SyncDescriptor(BrowserWorkspacesService, undefined, true), - [ITextResourcePropertiesService.toString()]: new SyncDescriptor(TextResourcePropertiesService, undefined, true) + [IWorkspacesService.toString()]: new SyncDescriptor(BrowserWorkspacesService, [], true), + [ITextResourcePropertiesService.toString()]: new SyncDescriptor(TextResourcePropertiesService, [], true) } } diff --git a/src/service-override/keybindings.ts b/src/service-override/keybindings.ts index 24bfaf05..4ce82160 100644 --- a/src/service-override/keybindings.ts +++ b/src/service-override/keybindings.ts @@ -123,7 +123,7 @@ export default function getServiceOverride ({ shouldUseGlobalKeybindings = () => return { ...getFileServiceOverride(), [IKeybindingService.toString()]: new SyncDescriptor(DynamicWorkbenchKeybindingService, [shouldUseGlobalKeybindings], false), - [IKeyboardLayoutService.toString()]: new SyncDescriptor(BrowserKeyboardLayoutService, undefined, true), + [IKeyboardLayoutService.toString()]: new SyncDescriptor(BrowserKeyboardLayoutService, [], true), [ICommandService.toString()]: new SyncDescriptor(CommandService, [], true) } } diff --git a/src/service-override/model.ts b/src/service-override/model.ts index d92be946..015ac4af 100644 --- a/src/service-override/model.ts +++ b/src/service-override/model.ts @@ -5,6 +5,6 @@ import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors' export default function getServiceOverride (): IEditorOverrideServices { return { - [ITextModelService.toString()]: new SyncDescriptor(TextModelResolverService, undefined, true) + [ITextModelService.toString()]: new SyncDescriptor(TextModelResolverService, [], true) } } diff --git a/src/service-override/notifications.ts b/src/service-override/notifications.ts index 99eaac64..34a07061 100644 --- a/src/service-override/notifications.ts +++ b/src/service-override/notifications.ts @@ -44,6 +44,6 @@ onRenderWorkbench(async (accessor) => { export default function getServiceOverride (): IEditorOverrideServices { return { - [INotificationService.toString()]: new SyncDescriptor(NotificationService, undefined, true) + [INotificationService.toString()]: new SyncDescriptor(NotificationService, [], true) } } diff --git a/src/service-override/output.ts b/src/service-override/output.ts index 6cb387c9..91e3035c 100644 --- a/src/service-override/output.ts +++ b/src/service-override/output.ts @@ -17,8 +17,8 @@ function getServiceOverride (logLevel?: LogLevel): IEditorOverrideServices function getServiceOverride (logLevel?: LogLevel): IEditorOverrideServices { return { ...getLogServiceOverride(logLevel), - [IOutputService.toString()]: new SyncDescriptor(OutputService, undefined, true), - [IOutputChannelModelService.toString()]: new SyncDescriptor(OutputChannelModelService, undefined, true) + [IOutputService.toString()]: new SyncDescriptor(OutputService, [], true), + [IOutputChannelModelService.toString()]: new SyncDescriptor(OutputChannelModelService, [], true) } }