-
-
Notifications
You must be signed in to change notification settings - Fork 435
/
Copy patharduino-electron-main-module.ts
22 lines (19 loc) · 1.43 KB
/
arduino-electron-main-module.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { ContainerModule } from 'inversify';
import { JsonRpcConnectionHandler } from '@theia/core/lib/common/messaging/proxy-factory';
import { ElectronConnectionHandler } from '@theia/core/lib/electron-common/messaging/electron-connection-handler';
import { ElectronMainWindowService } from '@theia/core/lib/electron-common/electron-main-window-service';
import { ElectronMainApplication as TheiaElectronMainApplication } from '@theia/core/lib/electron-main/electron-main-application';
import { SplashService, splashServicePath } from '../electron-common/splash-service';
import { SplashServiceImpl } from './splash/splash-service-impl';
import { ElectronMainApplication } from './theia/electron-main-application';
import { ElectronMainWindowServiceImpl } from './theia/electron-main-window-service';
export default new ContainerModule((bind, unbind, isBound, rebind) => {
bind(ElectronMainApplication).toSelf().inSingletonScope();
rebind(TheiaElectronMainApplication).toService(ElectronMainApplication);
bind(ElectronMainWindowServiceImpl).toSelf().inSingletonScope();
rebind(ElectronMainWindowService).toService(ElectronMainWindowServiceImpl);
bind(SplashServiceImpl).toSelf().inSingletonScope();
bind(SplashService).toService(SplashServiceImpl);
bind(ElectronConnectionHandler).toDynamicValue(context =>
new JsonRpcConnectionHandler(splashServicePath, () => context.container.get(SplashService))).inSingletonScope();
});