@@ -154,7 +154,10 @@ import {
154
154
MonitorManagerProxyFactory ,
155
155
MonitorManagerProxyPath ,
156
156
} from '../common/protocol' ;
157
- import { MonacoTextModelService as TheiaMonacoTextModelService } from '@theia/monaco/lib/browser/monaco-text-model-service' ;
157
+ import {
158
+ MonacoEditorModelFactory ,
159
+ MonacoTextModelService as TheiaMonacoTextModelService ,
160
+ } from '@theia/monaco/lib/browser/monaco-text-model-service' ;
158
161
import { MonacoTextModelService } from './theia/monaco/monaco-text-model-service' ;
159
162
import { ResponseServiceImpl } from './response-service-impl' ;
160
163
import {
@@ -249,7 +252,7 @@ import {
249
252
UserFieldsDialog ,
250
253
UserFieldsDialogProps ,
251
254
} from './dialogs/user-fields/user-fields-dialog' ;
252
- import { nls } from '@theia/core/lib/common' ;
255
+ import { nls , ResourceResolver } from '@theia/core/lib/common' ;
253
256
import { IDEUpdaterCommands } from './ide-updater/ide-updater-commands' ;
254
257
import {
255
258
IDEUpdater ,
@@ -313,6 +316,7 @@ import {
313
316
} from './widgets/component-list/filter-renderer' ;
314
317
import { CheckForUpdates } from './contributions/check-for-updates' ;
315
318
import { OutputEditorFactory } from './theia/output/output-editor-factory' ;
319
+ import { OutputEditorFactory as TheiaOutputEditorFactory } from '@theia/output/lib/browser/output-editor-factory' ;
316
320
import { StartupTaskProvider } from '../electron-common/startup-task' ;
317
321
import { DeleteSketch } from './contributions/delete-sketch' ;
318
322
import { UserFields } from './contributions/user-fields' ;
@@ -331,6 +335,10 @@ import { TypeHierarchyServiceProvider } from './theia/typehierarchy/type-hierarc
331
335
import { TypeHierarchyServiceProvider as TheiaTypeHierarchyServiceProvider } from '@theia/typehierarchy/lib/browser/typehierarchy-service' ;
332
336
import { TypeHierarchyContribution } from './theia/typehierarchy/type-hierarchy-contribution' ;
333
337
import { TypeHierarchyContribution as TheiaTypeHierarchyContribution } from '@theia/typehierarchy/lib/browser/typehierarchy-contribution' ;
338
+ import { MonitorResourceProvider } from './serial/monitor/monitor-resource-provider' ;
339
+ import { MonitorEditorFactory } from './serial/monitor/monitor-editor-factory' ;
340
+ import { MonitorEditorModelFactory } from './serial/monitor/monitor-editor-model-factory' ;
341
+ import { MonitorContextMenuService } from './serial/monitor/monitor-context-menu-service' ;
334
342
335
343
export default new ContainerModule ( ( bind , unbind , isBound , rebind ) => {
336
344
// Commands and toolbar items
@@ -465,17 +473,9 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
465
473
bind ( MonitorModel ) . toSelf ( ) . inSingletonScope ( ) ;
466
474
bindViewContribution ( bind , MonitorViewContribution ) ;
467
475
bind ( TabBarToolbarContribution ) . toService ( MonitorViewContribution ) ;
468
- bind ( WidgetFactory ) . toDynamicValue ( ( context ) => ( {
476
+ bind ( WidgetFactory ) . toDynamicValue ( ( { container } ) => ( {
469
477
id : MonitorWidget . ID ,
470
- createWidget : ( ) => {
471
- return new MonitorWidget (
472
- context . container . get < MonitorModel > ( MonitorModel ) ,
473
- context . container . get < MonitorManagerProxyClient > (
474
- MonitorManagerProxyClient
475
- ) ,
476
- context . container . get < BoardsServiceProvider > ( BoardsServiceProvider )
477
- ) ;
478
- } ,
478
+ createWidget : ( ) => container . get ( MonitorWidget ) ,
479
479
} ) ) ;
480
480
481
481
bind ( MonitorManagerProxyFactory ) . toFactory (
@@ -499,6 +499,15 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
499
499
. to ( MonitorManagerProxyClientImpl )
500
500
. inSingletonScope ( ) ;
501
501
502
+ bind ( MonitorResourceProvider ) . toSelf ( ) . inSingletonScope ( ) ;
503
+ bind ( ResourceResolver ) . toService ( MonitorResourceProvider ) ;
504
+ bind ( MonitorEditorFactory ) . toSelf ( ) . inSingletonScope ( ) ;
505
+ bind ( MonacoEditorFactory ) . toService ( MonitorEditorFactory ) ;
506
+ bind ( MonacoEditorModelFactory )
507
+ . to ( MonitorEditorModelFactory )
508
+ . inSingletonScope ( ) ;
509
+ bind ( MonitorContextMenuService ) . toSelf ( ) . inSingletonScope ( ) ;
510
+
502
511
bind ( WorkspaceService ) . toSelf ( ) . inSingletonScope ( ) ;
503
512
rebind ( TheiaWorkspaceService ) . toService ( WorkspaceService ) ;
504
513
bind ( WorkspaceVariableContribution ) . toSelf ( ) . inSingletonScope ( ) ;
@@ -611,8 +620,7 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
611
620
612
621
// To disable the highlighting of non-unicode characters in the _Output_ view
613
622
bind ( OutputEditorFactory ) . toSelf ( ) . inSingletonScope ( ) ;
614
- // Rebind to `TheiaOutputEditorFactory` when https://github.com/eclipse-theia/theia/pull/11615 is available.
615
- rebind ( MonacoEditorFactory ) . toService ( OutputEditorFactory ) ;
623
+ rebind ( TheiaOutputEditorFactory ) . toService ( OutputEditorFactory ) ;
616
624
617
625
bind ( ArduinoDaemon )
618
626
. toDynamicValue ( ( context ) =>
0 commit comments