@@ -161,7 +161,10 @@ import {
161
161
MonitorManagerProxyFactory ,
162
162
MonitorManagerProxyPath ,
163
163
} from '../common/protocol' ;
164
- import { MonacoTextModelService as TheiaMonacoTextModelService } from '@theia/monaco/lib/browser/monaco-text-model-service' ;
164
+ import {
165
+ MonacoEditorModelFactory ,
166
+ MonacoTextModelService as TheiaMonacoTextModelService ,
167
+ } from '@theia/monaco/lib/browser/monaco-text-model-service' ;
165
168
import { MonacoTextModelService } from './theia/monaco/monaco-text-model-service' ;
166
169
import { ResponseServiceImpl } from './response-service-impl' ;
167
170
import {
@@ -254,7 +257,7 @@ import {
254
257
UserFieldsDialog ,
255
258
UserFieldsDialogProps ,
256
259
} from './dialogs/user-fields/user-fields-dialog' ;
257
- import { nls } from '@theia/core/lib/common' ;
260
+ import { nls , ResourceResolver } from '@theia/core/lib/common' ;
258
261
import { IDEUpdaterCommands } from './ide-updater/ide-updater-commands' ;
259
262
import {
260
263
IDEUpdater ,
@@ -318,6 +321,7 @@ import {
318
321
} from './widgets/component-list/filter-renderer' ;
319
322
import { CheckForUpdates } from './contributions/check-for-updates' ;
320
323
import { OutputEditorFactory } from './theia/output/output-editor-factory' ;
324
+ import { OutputEditorFactory as TheiaOutputEditorFactory } from '@theia/output/lib/browser/output-editor-factory' ;
321
325
import { StartupTaskProvider } from '../electron-common/startup-task' ;
322
326
import { DeleteSketch } from './contributions/delete-sketch' ;
323
327
import { UserFields } from './contributions/user-fields' ;
@@ -358,6 +362,10 @@ import { MonacoEditorMenuContribution as TheiaMonacoEditorMenuContribution } fro
358
362
import { UpdateArduinoState } from './contributions/update-arduino-state' ;
359
363
import { TerminalFrontendContribution } from './theia/terminal/terminal-frontend-contribution' ;
360
364
import { TerminalFrontendContribution as TheiaTerminalFrontendContribution } from '@theia/terminal/lib/browser/terminal-frontend-contribution' ;
365
+ import { MonitorResourceProvider } from './serial/monitor/monitor-resource-provider' ;
366
+ import { MonitorEditorFactory } from './serial/monitor/monitor-editor-factory' ;
367
+ import { MonitorEditorModelFactory } from './serial/monitor/monitor-editor-model-factory' ;
368
+ import { MonitorContextMenuService } from './serial/monitor/monitor-context-menu-service' ;
361
369
362
370
// Hack to fix copy/cut/paste issue after electron version update in Theia.
363
371
// https://github.com/eclipse-theia/theia/issues/12487
@@ -502,9 +510,9 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
502
510
bind ( MonitorModel ) . toSelf ( ) . inSingletonScope ( ) ;
503
511
bindViewContribution ( bind , MonitorViewContribution ) ;
504
512
bind ( TabBarToolbarContribution ) . toService ( MonitorViewContribution ) ;
505
- bind ( WidgetFactory ) . toDynamicValue ( ( context ) => ( {
513
+ bind ( WidgetFactory ) . toDynamicValue ( ( { container } ) => ( {
506
514
id : MonitorWidget . ID ,
507
- createWidget : ( ) => context . container . get ( MonitorWidget ) ,
515
+ createWidget : ( ) => container . get ( MonitorWidget ) ,
508
516
} ) ) ;
509
517
510
518
bind ( MonitorManagerProxyFactory ) . toFactory (
@@ -528,6 +536,15 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
528
536
. to ( MonitorManagerProxyClientImpl )
529
537
. inSingletonScope ( ) ;
530
538
539
+ bind ( MonitorResourceProvider ) . toSelf ( ) . inSingletonScope ( ) ;
540
+ bind ( ResourceResolver ) . toService ( MonitorResourceProvider ) ;
541
+ bind ( MonitorEditorFactory ) . toSelf ( ) . inSingletonScope ( ) ;
542
+ bind ( MonacoEditorFactory ) . toService ( MonitorEditorFactory ) ;
543
+ bind ( MonacoEditorModelFactory )
544
+ . to ( MonitorEditorModelFactory )
545
+ . inSingletonScope ( ) ;
546
+ bind ( MonitorContextMenuService ) . toSelf ( ) . inSingletonScope ( ) ;
547
+
531
548
bind ( WorkspaceService ) . toSelf ( ) . inSingletonScope ( ) ;
532
549
rebind ( TheiaWorkspaceService ) . toService ( WorkspaceService ) ;
533
550
bind ( WorkspaceVariableContribution ) . toSelf ( ) . inSingletonScope ( ) ;
@@ -640,8 +657,7 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
640
657
641
658
// To disable the highlighting of non-unicode characters in the _Output_ view
642
659
bind ( OutputEditorFactory ) . toSelf ( ) . inSingletonScope ( ) ;
643
- // Rebind to `TheiaOutputEditorFactory` when https://github.com/eclipse-theia/theia/pull/11615 is available.
644
- rebind ( MonacoEditorFactory ) . toService ( OutputEditorFactory ) ;
660
+ rebind ( TheiaOutputEditorFactory ) . toService ( OutputEditorFactory ) ;
645
661
646
662
bind ( ArduinoDaemon )
647
663
. toDynamicValue ( ( context ) =>
0 commit comments