@@ -152,7 +152,7 @@ import {
152
152
OutputChannelRegistryMainImpl as TheiaOutputChannelRegistryMainImpl ,
153
153
OutputChannelRegistryMainImpl ,
154
154
} from './theia/plugin-ext/output-channel-registry-main' ;
155
- import { ExecutableService , ExecutableServicePath } from '../common/protocol' ;
155
+ import { ExecutableService , ExecutableServicePath , MonitorManagerProxy , MonitorManagerProxyClient , MonitorManagerProxyPath } from '../common/protocol' ;
156
156
import { MonacoTextModelService as TheiaMonacoTextModelService } from '@theia/monaco/lib/browser/monaco-text-model-service' ;
157
157
import { MonacoTextModelService } from './theia/monaco/monaco-text-model-service' ;
158
158
import { ResponseServiceImpl } from './response-service-impl' ;
@@ -267,7 +267,7 @@ import {
267
267
IDEUpdaterDialogWidget ,
268
268
} from './dialogs/ide-updater/ide-updater-dialog' ;
269
269
import { ElectronIpcConnectionProvider } from '@theia/core/lib/electron-browser/messaging/electron-ipc-connection-provider' ;
270
- import { MonitorManagerProxyClient } from '../common/ monitor-manager-proxy ' ;
270
+ import { MonitorModel } from './ monitor-model ' ;
271
271
import { MonitorManagerProxyClientImpl } from './monitor-manager-proxy-client-impl' ;
272
272
273
273
const ElementQueries = require ( 'css-element-queries/src/ElementQueries' ) ;
@@ -402,13 +402,23 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
402
402
403
403
// Serial monitor
404
404
bind ( MonitorWidget ) . toSelf ( ) ;
405
+ bind ( MonitorModel ) . toSelf ( ) . inSingletonScope ( ) ;
405
406
bindViewContribution ( bind , MonitorViewContribution ) ;
406
407
bind ( TabBarToolbarContribution ) . toService ( MonitorViewContribution ) ;
407
408
bind ( WidgetFactory ) . toDynamicValue ( ( context ) => ( {
408
409
id : MonitorWidget . ID ,
409
- createWidget : ( ) => context . container . get ( MonitorWidget ) ,
410
+ createWidget : ( ) => {
411
+ return new MonitorWidget (
412
+ context . container . get < MonitorModel > ( MonitorModel ) ,
413
+ context . container . get < MonitorManagerProxyClient > ( MonitorManagerProxyClient ) ,
414
+ context . container . get < BoardsServiceProvider > ( BoardsServiceProvider ) ,
415
+ ) ;
416
+ }
410
417
} ) ) ;
411
418
419
+ bind ( MonitorManagerProxy ) . toDynamicValue ( ( context ) =>
420
+ WebSocketConnectionProvider . createProxy ( context . container , MonitorManagerProxyPath )
421
+ ) . inSingletonScope ( ) ;
412
422
413
423
// Monitor manager proxy client to receive and delegate pluggable monitors
414
424
// notifications from the backend
0 commit comments