Skip to content

Commit 3a93418

Browse files
author
Benjamin Pasero
committed
debt - declarative notification service
1 parent c32a7de commit 3a93418

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/vs/workbench/electron-browser/workbench.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,6 @@ export class Workbench extends Disposable implements IWorkbenchLayoutService {
272272
// Parts
273273
serviceCollection.set(IWorkbenchLayoutService, this); // TODO@Ben use SyncDescriptor
274274

275-
// Notifications
276-
serviceCollection.set(INotificationService, new SyncDescriptor(NotificationService, undefined, true));
277-
278275
// Window
279276
serviceCollection.set(IWindowService, new SyncDescriptor(WindowService, [this.configuration]));
280277

src/vs/workbench/services/notification/common/notificationService.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { INotificationService, INotification, INotificationHandle, Severity, Not
77
import { INotificationsModel, NotificationsModel, ChoiceAction } from 'vs/workbench/common/notifications';
88
import { dispose, Disposable, IDisposable } from 'vs/base/common/lifecycle';
99
import { Event } from 'vs/base/common/event';
10+
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
1011

1112
export class NotificationService extends Disposable implements INotificationService {
1213

@@ -103,4 +104,6 @@ export class NotificationService extends Disposable implements INotificationServ
103104

104105
return handle;
105106
}
106-
}
107+
}
108+
109+
registerSingleton(INotificationService, NotificationService, true);

src/vs/workbench/workbench.main.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ import 'vs/workbench/services/extensionManagement/node/multiExtensionManagement'
116116
import 'vs/workbench/services/label/common/labelService';
117117
import 'vs/workbench/services/extensions/node/extensionManagementServerService';
118118
import 'vs/workbench/services/remote/electron-browser/remoteAgentServiceImpl';
119+
import 'vs/workbench/services/notification/common/notificationService';
119120

120121
registerSingleton(IMenuService, MenuService, true);
121122
registerSingleton(IListService, ListService, true);

0 commit comments

Comments
 (0)