Skip to content

Commit

Permalink
refactor: homogenize syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Loïc Mangeonjean committed Jul 16, 2024
1 parent e5a920f commit b8c6036
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/monaco.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion src/service-override/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
4 changes: 2 additions & 2 deletions src/service-override/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/service-override/keybindings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/service-override/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
2 changes: 1 addition & 1 deletion src/service-override/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
4 changes: 2 additions & 2 deletions src/service-override/output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit b8c6036

Please sign in to comment.