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