|
1 |
| -import { ContainerModule } from '@theia/core/shared/inversify'; |
2 | 1 | import { JsonRpcConnectionHandler } from '@theia/core/lib/common/messaging/proxy-factory';
|
3 |
| -import { ElectronConnectionHandler } from '@theia/core/lib/electron-common/messaging/electron-connection-handler'; |
4 | 2 | import { ElectronMainWindowService } from '@theia/core/lib/electron-common/electron-main-window-service';
|
| 3 | +import { ElectronConnectionHandler } from '@theia/core/lib/electron-common/messaging/electron-connection-handler'; |
5 | 4 | import {
|
6 | 5 | ElectronMainApplication as TheiaElectronMainApplication,
|
7 | 6 | ElectronMainApplicationContribution,
|
8 | 7 | } from '@theia/core/lib/electron-main/electron-main-application';
|
| 8 | +import { TheiaElectronWindow as DefaultTheiaElectronWindow } from '@theia/core/lib/electron-main/theia-electron-window'; |
| 9 | +import { ContainerModule } from '@theia/core/shared/inversify'; |
| 10 | +import { |
| 11 | + IDEUpdater, |
| 12 | + IDEUpdaterClient, |
| 13 | + IDEUpdaterPath, |
| 14 | +} from '../common/protocol/ide-updater'; |
| 15 | +import { |
| 16 | + ElectronMainWindowServiceExt, |
| 17 | + electronMainWindowServiceExtPath, |
| 18 | +} from '../electron-common/electron-main-window-service-ext'; |
9 | 19 | import {
|
10 | 20 | SplashService,
|
11 | 21 | splashServicePath,
|
12 | 22 | } from '../electron-common/splash-service';
|
| 23 | +import { ElectronMainWindowServiceExtImpl } from './electron-main-window-service-ext-impl'; |
| 24 | +import { IDEUpdaterImpl } from './ide-updater/ide-updater-impl'; |
13 | 25 | import { SplashServiceImpl } from './splash/splash-service-impl';
|
14 | 26 | import { ElectronMainApplication } from './theia/electron-main-application';
|
15 | 27 | import { ElectronMainWindowServiceImpl } from './theia/electron-main-window-service';
|
16 |
| -import { |
17 |
| - IDEUpdater, |
18 |
| - IDEUpdaterClient, |
19 |
| - IDEUpdaterPath, |
20 |
| -} from '../common/protocol/ide-updater'; |
21 |
| -import { IDEUpdaterImpl } from './ide-updater/ide-updater-impl'; |
22 | 28 | import { TheiaElectronWindow } from './theia/theia-electron-window';
|
23 |
| -import { TheiaElectronWindow as DefaultTheiaElectronWindow } from '@theia/core/lib/electron-main/theia-electron-window'; |
24 |
| -import { SurveyNotificationServiceImpl } from '../node/survey-service-impl'; |
25 |
| -import { |
26 |
| - SurveyNotificationService, |
27 |
| - SurveyNotificationServicePath, |
28 |
| -} from '../common/protocol/survey-service'; |
29 | 29 |
|
30 | 30 | export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
31 | 31 | bind(ElectronMainApplication).toSelf().inSingletonScope();
|
@@ -67,19 +67,14 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
67 | 67 | bind(TheiaElectronWindow).toSelf();
|
68 | 68 | rebind(DefaultTheiaElectronWindow).toService(TheiaElectronWindow);
|
69 | 69 |
|
70 |
| - // Survey notification bindings |
71 |
| - bind(SurveyNotificationServiceImpl).toSelf().inSingletonScope(); |
72 |
| - bind(SurveyNotificationService).toService(SurveyNotificationServiceImpl); |
73 |
| - bind(ElectronMainApplicationContribution).toService( |
74 |
| - SurveyNotificationService |
75 |
| - ); |
| 70 | + bind(ElectronMainWindowServiceExt) |
| 71 | + .to(ElectronMainWindowServiceExtImpl) |
| 72 | + .inSingletonScope(); |
76 | 73 | bind(ElectronConnectionHandler)
|
77 | 74 | .toDynamicValue(
|
78 | 75 | (context) =>
|
79 |
| - new JsonRpcConnectionHandler(SurveyNotificationServicePath, () => |
80 |
| - context.container.get<SurveyNotificationService>( |
81 |
| - SurveyNotificationService |
82 |
| - ) |
| 76 | + new JsonRpcConnectionHandler(electronMainWindowServiceExtPath, () => |
| 77 | + context.container.get(ElectronMainWindowServiceExt) |
83 | 78 | )
|
84 | 79 | )
|
85 | 80 | .inSingletonScope();
|
|
0 commit comments