Contains the code for the Typescript-based framework to create GLSP server components. The implementation of this server is aligned with the default Java based GLSP Server.
The server consists of three components:
@eclipse-glsp/serverThe base framework for building GLSP servers@eclipse-glsp/graphThe Typescript based implementation of the graphical model used in GLSP (GModel).@eclipse-glsp-examples/workflow-serverGLSP example server using the workflow model.
The main target environment is node, nevertheless, all components are implemented in an ismorphic fashion and also provide an entrypoint to target browser environments (e.g. running the server in a web worker)
- Install node.js (requires Node v22+)
- Install pnpm: https://pnpm.io/installation (use pnpm 10+); a recent pnpm automatically switches to the version pinned in the
packageManagerfield - Clone this repository
- Install dependencies:
pnpm iorpnpm i --frozen-lockfile
- Build (all packages):
pnpm build - Test (all packages):
pnpm test - Lint (all packages):
pnpm lint - Clean (all packages):
pnpm clean - Full validation:
pnpm check:all
The workflow diagram is a consistent example provided by all GLSP components. The example implements a simple flow chart diagram editor with different types of nodes and edges (see screenshot below). The example can be used to try out different GLSP features, as well as several available integrations with IDE platforms (Theia, VSCode, Eclipse, Standalone). As the example is fully open source, you can also use it as a blueprint for a custom implementation of a GLSP diagram editor. See our project website for an overview of the workflow example and all components implementing it.
diagramanimated.mp4
To see the diagram in action, you need to choose and launch one diagram client, see here for an overview of available clients.
glsp-theia-integration: Diagrams clients integrated into Theia.glsp-vscode-integration: Diagram clients integrated into VSCode.glsp-eclipse-integration: Diagram clients integrated into Eclipse IDE.
Please look at the workflow example guides in the repository linked above to get more information on building and running the respective GLSP clients.
To launch the server for TCP sockets use:
pnpm startThis starts a server that is listening on port 5007 for incoming client requests.
To debug you can use the Debug workflow example GLSP Server launch configuration.
To test the server you have to connect a workflow GLSP client that supports JSON-RPC via socket.
We recommend to use the client provided by the glsp-integration.
To launch the server for WebSockets use:
pnpm start:websocketThis starts a server that is listening on the ws://localhost:8081/workflow endpoint for incoming client requests.
To debug you can use the Debug workflow example GLSP Server (Websocket) launch configuration.
To test the server you have to connect a workflow GLSP client that supports JSON-RPC via WebSocket.
We recommend to use the standalone example provided by glsp-client.
For more information, please visit the Eclipse GLSP Umbrella repository and the Eclipse GLSP Website. If you have questions, please raise them in the discussions and have a look at our communication and support options.