@@ -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' ;
@@ -343,6 +347,10 @@ import { DebugWidget } from '@theia/debug/lib/browser/view/debug-widget';
343
347
import { DebugViewModel } from '@theia/debug/lib/browser/view/debug-view-model' ;
344
348
import { DebugSessionWidget } from '@theia/debug/lib/browser/view/debug-session-widget' ;
345
349
import { DebugConfigurationWidget } from '@theia/debug/lib/browser/view/debug-configuration-widget' ;
350
+ import { MonitorResourceProvider } from './serial/monitor/monitor-resource-provider' ;
351
+ import { MonitorEditorFactory } from './serial/monitor/monitor-editor-factory' ;
352
+ import { MonitorEditorModelFactory } from './serial/monitor/monitor-editor-model-factory' ;
353
+ import { MonitorContextMenuService } from './serial/monitor/monitor-context-menu-service' ;
346
354
347
355
export default new ContainerModule ( ( bind , unbind , isBound , rebind ) => {
348
356
// Commands and toolbar items
@@ -477,17 +485,9 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
477
485
bind ( MonitorModel ) . toSelf ( ) . inSingletonScope ( ) ;
478
486
bindViewContribution ( bind , MonitorViewContribution ) ;
479
487
bind ( TabBarToolbarContribution ) . toService ( MonitorViewContribution ) ;
480
- bind ( WidgetFactory ) . toDynamicValue ( ( context ) => ( {
488
+ bind ( WidgetFactory ) . toDynamicValue ( ( { container } ) => ( {
481
489
id : MonitorWidget . ID ,
482
- createWidget : ( ) => {
483
- return new MonitorWidget (
484
- context . container . get < MonitorModel > ( MonitorModel ) ,
485
- context . container . get < MonitorManagerProxyClient > (
486
- MonitorManagerProxyClient
487
- ) ,
488
- context . container . get < BoardsServiceProvider > ( BoardsServiceProvider )
489
- ) ;
490
- } ,
490
+ createWidget : ( ) => container . get ( MonitorWidget ) ,
491
491
} ) ) ;
492
492
493
493
bind ( MonitorManagerProxyFactory ) . toFactory (
@@ -511,6 +511,15 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
511
511
. to ( MonitorManagerProxyClientImpl )
512
512
. inSingletonScope ( ) ;
513
513
514
+ bind ( MonitorResourceProvider ) . toSelf ( ) . inSingletonScope ( ) ;
515
+ bind ( ResourceResolver ) . toService ( MonitorResourceProvider ) ;
516
+ bind ( MonitorEditorFactory ) . toSelf ( ) . inSingletonScope ( ) ;
517
+ bind ( MonacoEditorFactory ) . toService ( MonitorEditorFactory ) ;
518
+ bind ( MonacoEditorModelFactory )
519
+ . to ( MonitorEditorModelFactory )
520
+ . inSingletonScope ( ) ;
521
+ bind ( MonitorContextMenuService ) . toSelf ( ) . inSingletonScope ( ) ;
522
+
514
523
bind ( WorkspaceService ) . toSelf ( ) . inSingletonScope ( ) ;
515
524
rebind ( TheiaWorkspaceService ) . toService ( WorkspaceService ) ;
516
525
bind ( WorkspaceVariableContribution ) . toSelf ( ) . inSingletonScope ( ) ;
@@ -623,8 +632,7 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
623
632
624
633
// To disable the highlighting of non-unicode characters in the _Output_ view
625
634
bind ( OutputEditorFactory ) . toSelf ( ) . inSingletonScope ( ) ;
626
- // Rebind to `TheiaOutputEditorFactory` when https://github.com/eclipse-theia/theia/pull/11615 is available.
627
- rebind ( MonacoEditorFactory ) . toService ( OutputEditorFactory ) ;
635
+ rebind ( TheiaOutputEditorFactory ) . toService ( OutputEditorFactory ) ;
628
636
629
637
bind ( ArduinoDaemon )
630
638
. toDynamicValue ( ( context ) =>
0 commit comments