|
1 | 1 | import '../../src/browser/style/index.css';
|
2 | 2 | import { ContainerModule } from 'inversify';
|
3 | 3 | import { WidgetFactory } from '@theia/core/lib/browser/widget-manager';
|
4 |
| -import { CommandContribution } from '@theia/core/lib/common/command'; |
| 4 | +import { |
| 5 | + CommandContribution, |
| 6 | + CommandRegistry, |
| 7 | +} from '@theia/core/lib/common/command'; |
5 | 8 | import { bindViewContribution } from '@theia/core/lib/browser/shell/view-contribution';
|
6 | 9 | import {
|
7 | 10 | TabBarToolbarContribution,
|
@@ -152,7 +155,14 @@ import {
|
152 | 155 | OutputChannelRegistryMainImpl as TheiaOutputChannelRegistryMainImpl,
|
153 | 156 | OutputChannelRegistryMainImpl,
|
154 | 157 | } from './theia/plugin-ext/output-channel-registry-main';
|
155 |
| -import { ExecutableService, ExecutableServicePath, MonitorManagerProxy, MonitorManagerProxyClient, MonitorManagerProxyFactory, MonitorManagerProxyPath } from '../common/protocol'; |
| 158 | +import { |
| 159 | + ExecutableService, |
| 160 | + ExecutableServicePath, |
| 161 | + MonitorManagerProxy, |
| 162 | + MonitorManagerProxyClient, |
| 163 | + MonitorManagerProxyFactory, |
| 164 | + MonitorManagerProxyPath, |
| 165 | +} from '../common/protocol'; |
156 | 166 | import { MonacoTextModelService as TheiaMonacoTextModelService } from '@theia/monaco/lib/browser/monaco-text-model-service';
|
157 | 167 | import { MonacoTextModelService } from './theia/monaco/monaco-text-model-service';
|
158 | 168 | import { ResponseServiceImpl } from './response-service-impl';
|
@@ -411,21 +421,35 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
411 | 421 | createWidget: () => {
|
412 | 422 | return new MonitorWidget(
|
413 | 423 | context.container.get<MonitorModel>(MonitorModel),
|
414 |
| - context.container.get<MonitorManagerProxyClient>(MonitorManagerProxyClient), |
| 424 | + context.container.get<MonitorManagerProxyClient>( |
| 425 | + MonitorManagerProxyClient |
| 426 | + ), |
415 | 427 | context.container.get<BoardsServiceProvider>(BoardsServiceProvider),
|
| 428 | + context.container.get<CommandRegistry>(CommandRegistry) |
416 | 429 | );
|
417 |
| - } |
| 430 | + }, |
418 | 431 | }));
|
419 | 432 |
|
420 |
| - bind(MonitorManagerProxyFactory).toFactory((context) => () => context.container.get<MonitorManagerProxy>(MonitorManagerProxy)) |
| 433 | + bind(MonitorManagerProxyFactory).toFactory( |
| 434 | + (context) => () => |
| 435 | + context.container.get<MonitorManagerProxy>(MonitorManagerProxy) |
| 436 | + ); |
421 | 437 |
|
422 |
| - bind(MonitorManagerProxy).toDynamicValue((context) => |
423 |
| - WebSocketConnectionProvider.createProxy(context.container, MonitorManagerProxyPath, context.container.get(MonitorManagerProxyClient)) |
424 |
| - ).inSingletonScope(); |
| 438 | + bind(MonitorManagerProxy) |
| 439 | + .toDynamicValue((context) => |
| 440 | + WebSocketConnectionProvider.createProxy( |
| 441 | + context.container, |
| 442 | + MonitorManagerProxyPath, |
| 443 | + context.container.get(MonitorManagerProxyClient) |
| 444 | + ) |
| 445 | + ) |
| 446 | + .inSingletonScope(); |
425 | 447 |
|
426 | 448 | // Monitor manager proxy client to receive and delegate pluggable monitors
|
427 | 449 | // notifications from the backend
|
428 |
| - bind(MonitorManagerProxyClient).to(MonitorManagerProxyClientImpl).inSingletonScope(); |
| 450 | + bind(MonitorManagerProxyClient) |
| 451 | + .to(MonitorManagerProxyClientImpl) |
| 452 | + .inSingletonScope(); |
429 | 453 |
|
430 | 454 | bind(WorkspaceService).toSelf().inSingletonScope();
|
431 | 455 | rebind(TheiaWorkspaceService).toService(WorkspaceService);
|
@@ -482,11 +506,12 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
482 | 506 | .inSingletonScope();
|
483 | 507 | rebind(TheiaEditorWidgetFactory).to(EditorWidgetFactory).inSingletonScope();
|
484 | 508 | rebind(TabBarToolbarFactory).toFactory(
|
485 |
| - ({ container: parentContainer }) => () => { |
486 |
| - const container = parentContainer.createChild(); |
487 |
| - container.bind(TabBarToolbar).toSelf().inSingletonScope(); |
488 |
| - return container.get(TabBarToolbar); |
489 |
| - } |
| 509 | + ({ container: parentContainer }) => |
| 510 | + () => { |
| 511 | + const container = parentContainer.createChild(); |
| 512 | + container.bind(TabBarToolbar).toSelf().inSingletonScope(); |
| 513 | + return container.get(TabBarToolbar); |
| 514 | + } |
490 | 515 | );
|
491 | 516 | bind(OutputWidget).toSelf().inSingletonScope();
|
492 | 517 | rebind(TheiaOutputWidget).toService(OutputWidget);
|
@@ -651,15 +676,13 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
651 | 676 |
|
652 | 677 | // Enable the dirty indicator on uncloseable widgets.
|
653 | 678 | rebind(TabBarRendererFactory).toFactory((context) => () => {
|
654 |
| - const contextMenuRenderer = context.container.get<ContextMenuRenderer>( |
655 |
| - ContextMenuRenderer |
656 |
| - ); |
| 679 | + const contextMenuRenderer = |
| 680 | + context.container.get<ContextMenuRenderer>(ContextMenuRenderer); |
657 | 681 | const decoratorService = context.container.get<TabBarDecoratorService>(
|
658 | 682 | TabBarDecoratorService
|
659 | 683 | );
|
660 |
| - const iconThemeService = context.container.get<IconThemeService>( |
661 |
| - IconThemeService |
662 |
| - ); |
| 684 | + const iconThemeService = |
| 685 | + context.container.get<IconThemeService>(IconThemeService); |
663 | 686 | return new TabBarRenderer(
|
664 | 687 | contextMenuRenderer,
|
665 | 688 | decoratorService,
|
|
0 commit comments