An open API service indexing awesome lists of open source software.

https://github.com/eclipse-glsp/glsp-server

Java-based server framework of the graphical language server platform
https://github.com/eclipse-glsp/glsp-server

diagram diagram-editor emf glsp graphical-modeling graphical-models java lsp lsp-server modeling-tools

Last synced: 2 months ago
JSON representation

Java-based server framework of the graphical language server platform

Awesome Lists containing this project

README

        

# Eclipse GLSP Server [![Build Status](https://ci.eclipse.org/glsp/job/eclipse-glsp/job/glsp-server/job/master/badge/icon)](https://ci.eclipse.org/glsp/job/eclipse-glsp/job/glsp-server/job/master/)

Contains the code for the Java-based framework to create [GLSP](https://github.com/eclipse-glsp/glsp) server components.

## Building

The GLSP server bundles are built with Java 17 or higher and maven.
Execute `mvn clean verify -Pm2` (for maven) or `mvn clean verify -Pp2` (for p2).
The nightly builds are available as maven repository or p2 update site.

### Maven Repositories

- *Snapshots:*
- *Releases/Release Candiates:* (also mirrored to the [maven central repository](https://search.maven.org/search?q=org.eclipse.glsp))

### P2 Update Sites

- *Snapshots:*
- *Release Candidates:*
- *Releases:*

All changes on the master branch are deployed automatically to the corresponding snapshot repositories.

## Structure of this repository

- `org.eclipse.glsp.graph`: EMF-based implementation of graphical model that's used for client-server communication
- `org.eclipse.glsp.layout`: Server-based layout using the [Eclipse Layout Kernel](https://www.eclipse.org/elk/) framework (adapted from [Eclipse Sprotty Server](https://www.github.com/eclipse/sprotty-server))
- `org.eclipse.glsp.server`: Generic base implementation for standalone GLSP servers (based on JSON-RPC)
- `org.eclipse.glsp.server.emf`: Reusable implementations if an [EMF](https://www.eclipse.org/modeling/emf/)-based source model is used
- `org.eclipse.glsp.server.websocket`: Extension of the base server implementation for communication over websockets

- `org.eclipse.glsp.example.workflow`: GLSP server for the Workflow Diagram example

## Workflow Diagram Example

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, VS Code, 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](https://www.eclipse.org/glsp/documentation/#workflowoverview) for an overview of the workflow example and all components implementing it.

https://user-images.githubusercontent.com/588090/154459938-849ca684-11b3-472c-8a59-98ea6cb0b4c1.mp4

### How to start the Workflow Diagram example?

To see the diagram in action, you need to choose and launch one diagram client, see [here for an overview of available clients](https://www.eclipse.org/glsp/examples/#workflowoverview).

- [`glsp-theia-integration`](https://github.com/eclipse-glsp/glsp-theia-integration): Diagrams clients integrated into [Theia](https://github.com/theia-ide/theia).
- [`glsp-vscode-integration`](https://github.com/eclipse-glsp/glsp-vscode-integration): Diagram clients integrated into [VS Code](https://github.com/microsoft/vscode).
- [`glsp-eclipse-integration`](https://github.com/eclipse-glsp/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 respecitive GLSP clients.

### Building the Workflow Diagram example server

In the root of this repository, run

```bash
mvn clean verify -Pm2 -Pfatjar
```

### Execute from IDE

To run the Workflow Diagram example server within an IDE, run the main method of
[`WorkflowServerLauncher.java`](./examples/org.eclipse.glsp.example.workflow/src/org/eclipse/glsp/example/workflow/launch/WorkflowServerLauncher.java) as a Java Application, located in the module `glsp-server/examples/org.eclipse.glsp.example.workflow.launch`.

### Execute Standalone JAR

In the folder `examples/org.eclipse.glsp.example.workflow/target`, you should have a jar file `org.eclipse.glsp.example.workflow-X.X.X-SNAPSHOT-glsp.jar` whereas `X.X.X` is the current version.

To run the Workflow Diagram example server standalone JAR, run this command in your terminal:

```console
cd examples/org.eclipse.glsp.example.workflow/target
java -jar org.eclipse.glsp.example.workflow-X.X.X-SNAPSHOT-glsp.jar
```

#### Usage

```console
usage: java -jar org.eclipse.glsp.example.workflow-X.X.X-glsp.jar [-c ] [-d ]
[-f ] [-h] [-j ] [-l ] [-p ] [-w]

options:
-c,--consoleLog Enable/Disable console logging. [default='true']
-d,--logDir Set the directory for log files (File logging has to be
enabled)
-f,--fileLog Enable/Disable file logging. [default='false']
-h,--help Display usage information about GLSPServerLauncher
-j,--jettyLogLevel Set the log level for the Jetty websocket server.
[default='INFO']
-l,--logLevel Set the log level. [default='INFO']
-p,--port Set server port. [default='0']
-w,--websocket Use websocket launcher instead of default launcher.
```

Once the server is running, choose a diagram client integration (such as Eclipse Theia, VS Code, Eclipse, or Standalone) below.

### Where to find the sources?

In addition to this repository, the related source code can be found here:

-
-
-
-

## See also

For more information, please visit the [Eclipse GLSP Umbrella repository](https://github.com/eclipse-glsp/glsp) and the [Eclipse GLSP Website](https://www.eclipse.org/glsp/).
If you have questions, please raise them in the [discussions](https://github.com/eclipse-glsp/glsp/discussions) and have a look at our [communication and support options](https://www.eclipse.org/glsp/contact/).