Skip to content

Commit

Permalink
GLSP-944 Remove usage of vscode-ws-jsonrpc
Browse files Browse the repository at this point in the history
  • Loading branch information
tortmayr committed Mar 4, 2023
1 parent af77f57 commit 5cd6b15
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions client/examples/workflow-webapp/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
TYPES
} from '@eclipse-glsp/client';
import { getParameters } from '@eclipse-glsp/ide';
import { ApplicationIdProvider, GLSPClient } from '@eclipse-glsp/protocol';
import { ApplicationIdProvider, GLSPClient, listen } from '@eclipse-glsp/protocol';
import { MessageConnection } from 'vscode-jsonrpc';
import createContainer from './di.config';

Expand All @@ -47,10 +47,8 @@ const container = createContainer(widgetId);
const diagramServer = container.get<GLSPDiagramServer>(TYPES.ModelSource);
diagramServer.clientId = clientId;

import('vscode-ws-jsonrpc').then(jsonrpc => {
const websocket = new WebSocket(`ws://localhost:${port}/${id}`);
jsonrpc.listen({ webSocket: websocket, onConnection: connection => initialize(connection) });
});
const websocket = new WebSocket(`ws://localhost:${port}/${id}`);
listen(websocket, connection => initialize(connection));

async function initialize(connectionProvider: MessageConnection): Promise<void> {
const client = new BaseJsonrpcGLSPClient({ id, connectionProvider });
Expand Down

0 comments on commit 5cd6b15

Please sign in to comment.