Skip to content

Commit ebab0b2

Browse files
silvanocerzaAlberto Iannaccone
authored and
Alberto Iannaccone
committed
Scaffold interfaces and classes for pluggable monitors
1 parent 2b2ea72 commit ebab0b2

6 files changed

+53
-0
lines changed

arduino-ide-extension/src/browser/arduino-ide-frontend-module.ts

+6
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@ import {
275275
IDEUpdaterDialogWidget,
276276
} from './dialogs/ide-updater/ide-updater-dialog';
277277
import { ElectronIpcConnectionProvider } from '@theia/core/lib/electron-browser/messaging/electron-ipc-connection-provider';
278+
import { MonitorManagerProxyClient } from '../common/monitor-manager-proxy';
279+
import { MonitorManagerProxyClientImpl } from './monitor-manager-proxy-client-impl';
278280

279281
const ElementQueries = require('css-element-queries/src/ElementQueries');
280282

@@ -431,6 +433,10 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
431433
// Serial service client to receive and delegate notifications from the backend.
432434
bind(SerialServiceClient).to(SerialServiceClientImpl).inSingletonScope();
433435

436+
// Monitor manager proxy client to receive and delegate pluggable monitors
437+
// notifications from the backend
438+
bind(MonitorManagerProxyClient).to(MonitorManagerProxyClientImpl).inSingletonScope();
439+
434440
bind(WorkspaceService).toSelf().inSingletonScope();
435441
rebind(TheiaWorkspaceService).toService(WorkspaceService);
436442
bind(WorkspaceVariableContribution).toSelf().inSingletonScope();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { injectable } from "@theia/core/shared/inversify";
2+
import { MonitorManagerProxyClient } from "../common/monitor-manager-proxy";
3+
4+
@injectable()
5+
export class MonitorManagerProxyClientImpl implements MonitorManagerProxyClient {
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { JsonRpcServer } from "@theia/core";
2+
3+
export const MonitorManagerProxyPath = '/services/monitor-manager-proxy';
4+
export const MonitorManagerProxy = Symbol('MonitorManagerProxy');
5+
export interface MonitorManagerProxy extends JsonRpcServer<MonitorManagerProxyClient> {
6+
7+
}
8+
9+
export const MonitorManagerProxyClient = Symbol('MonitorManagerProxyClient');
10+
export interface MonitorManagerProxyClient {
11+
12+
}

arduino-ide-extension/src/node/arduino-ide-backend-module.ts

+3
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ import WebSocketServiceImpl from './web-socket/web-socket-service-impl';
8686
import { WebSocketService } from './web-socket/web-socket-service';
8787
import { ArduinoLocalizationContribution } from './arduino-localization-contribution';
8888
import { LocalizationContribution } from '@theia/core/lib/node/i18n/localization-contribution';
89+
import { MonitorManagerProxyImpl } from './monitor-manager-proxy-impl';
90+
import { MonitorManager } from './monitor-manager';
91+
import { MonitorManagerProxy, MonitorManagerProxyClient, MonitorManagerProxyPath } from '../common/monitor-manager-proxy';
8992

9093
export default new ContainerModule((bind, unbind, isBound, rebind) => {
9194
bind(BackendApplication).toSelf().inSingletonScope();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { inject, injectable } from "@theia/core/shared/inversify";
2+
import { MonitorManagerProxy, MonitorManagerProxyClient } from "../common/monitor-manager-proxy";
3+
import { MonitorManager } from "./monitor-manager";
4+
5+
@injectable()
6+
export class MonitorManagerProxyImpl implements MonitorManagerProxy {
7+
constructor(
8+
@inject(MonitorManager)
9+
protected readonly manager: MonitorManager,
10+
) {
11+
}
12+
13+
dispose(): void {
14+
// TODO
15+
}
16+
17+
setClient(client: MonitorManagerProxyClient | undefined): void {
18+
// TODO
19+
}
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { injectable } from "@theia/core/shared/inversify";
2+
3+
@injectable()
4+
export class MonitorManager {
5+
6+
}

0 commit comments

Comments
 (0)