# @glsp/theia-integration

> Glue code to integrate GLSP clients into Eclipse Theia

Latest version **0.1.0** (published 2019-04-15) · (EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0) license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @glsp/theia-integration
pnpm add @glsp/theia-integration
yarn add @glsp/theia-integration
bun add @glsp/theia-integration
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2019-04-15 |
| First published | 2019-04-15 |
| Weekly downloads | 0 |
| License | (EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0) |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 202.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 39 |
| Author | EclipseSource |
| Maintainers | eclipsesource, tortmayr |
| Keywords | theia-extension, eclipse, graphics, diagram, modeling, visualization, glsp, diagram editor |

## Links

- npm: https://www.npmjs.com/package/@glsp/theia-integration
- Repository: https://github.com/eclipsesource/graphical-lsp
- Issues: https://github.com/eclipsesource/graphical-lsp/issues
- npm.io page: https://npm.io/package/@glsp/theia-integration

## Dependencies (8)

- [@theia/core](https://npm.io/package/@theia/core.md) ^0.4.0
- [@types/node](https://npm.io/package/@types/node.md) ^8.0.14
- [@theia/editor](https://npm.io/package/@theia/editor.md) ^0.4.0
- [@theia/monaco](https://npm.io/package/@theia/monaco.md) ^0.4.0
- [sprotty-theia](https://npm.io/package/sprotty-theia.md) 0.6.0
- [@theia/languages](https://npm.io/package/@theia/languages.md) ^0.4.0
- [@theia/filesystem](https://npm.io/package/@theia/filesystem.md) ^0.4.0
- [@glsp/sprotty-client](https://npm.io/package/@glsp/sprotty-client.md) ^0.1.0

## Alternatives

- [d3-force-3d](https://npm.io/package/d3-force-3d.md) — 1.0M weekly downloads
- [ng2-charts](https://npm.io/package/ng2-charts.md) — 486.8K weekly downloads
- [@arcgis/core](https://npm.io/package/@arcgis/core.md) — 257.8K weekly downloads
- [react-sparklines](https://npm.io/package/react-sparklines.md) — 249.3K weekly downloads
- [react-native-gifted-charts](https://npm.io/package/react-native-gifted-charts.md) — 182.3K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2019-04-15
- 0.2.0-next.cd11354e (next) — 2019-11-14
- 0.2.0-next.8aaf5ffc — 2019-11-14
- 0.2.0-next.1de397b4 — 2019-11-12
- 0.2.0-next.abc74264 — 2019-10-31
- 0.2.0-next.e4c591d5 — 2019-10-25
- 0.2.0-next.f64e2bd7 — 2019-10-25
- 0.2.0-next.3f048ac3 — 2019-10-22
- 0.2.0-next.99c028ef — 2019-10-21
- 0.2.0-next.b2cccaf3 — 2019-10-21
- 0.2.0-next.1c2ed6f2 — 2019-10-10
- 0.2.0-next.69649b7d — 2019-10-10
- 0.2.0-next.e135e793 — 2019-10-09
- 0.2.0-next.dae58f79 — 2019-10-09
- 0.2.0-next.a4f0b22e — 2019-10-04
- … 41 more at https://npm.io/package/@glsp/theia-integration/versions

## README

# **!!! This repository is discontinued. This project has moved to [eclipse-glsp](https://github.com/eclipse-glsp/glsp) and will be maintained there !!!**

# Graphical Language Server Protocol Framework [![Build Status](https://travis-ci.org/eclipsesource/graphical-lsp.svg?branch=master)](https://travis-ci.org/eclipsesource/graphical-lsp)

The Graphical Language Server Protocol Framework provides extensible components to enable the development of *diagram editors including edit functionality* in (distributed) web-applications via a client-server protocol.
This [Graphical Language Server Protocol (GLSP)](https://github.com/eclipsesource/GraphicalServerProtocol/blob/master/specification.md) is work in progress and developed in collaboration among TypeFox, Obeo, and EclipseSource.
It follows the same architectural pattern as the [Language Server Protocol](https://github.com/Microsoft/language-server-protocol) for textual languages, but applies it to graphical modeling for browser/cloud-based deployments.
The protocol as well as the client implementation is heavily based on [Sprotty](https://github.com/eclipse/sprotty) but extends it with editing functionality and GLSP-specific communication with the server.

Below is a screenshot of a small example diagram being edited in the GLSP client, as well as the server log printing the GLSP actions processed on the server during the current editing session. Click on the image below to see it in action.

[![Screenshot of GLSP Client with Server Log](documentation/glsp-reduced-teaser.png)](documentation/glsp-animated-reduced.gif)

For more information, you can also watch the [EclipseCon Europe 2018 talk](https://www.youtube.com/watch?v=snb1UTSH3Zw) or look at [the slides of this talk](https://docs.google.com/presentation/d/e/2PACX-1vS6VlDFPTNGTt7QdwgLZSgF2swXV_qkl9zCXb43dgPYPQRhP-a83eC-Sta54ETMTzhook3S32clXpL9/pub?start=false&loop=false&delayms=3000&slide=id.g120ca87e56_0_4).
## Build artifacts
The client packages are available via [NPM](https://www.npmjs.com/search?q=%40glsp).<br>
<br>
The server packages are available as maven repository or p2 update site.<br>
#### Maven Repositories
- <i>Releases: </i> https://repo.maven.apache.org/maven2/com/eclipsesource/glsp/
- <i>Snapshots: </i> https://oss.sonatype.org/content/repositories/snapshots/com/eclipsesource/glsp/
#### P2 Update Sites
- <i>Releases: </i> https://dl.bintray.com/eclipsesource/glsp/releases/
- <i>Snapshots: </i> https://dl.bintray.com/eclipsesource/glsp/nightly <br><br>
All changes on the master branch are deployed automatically to the corresponding snapshot repository

## Getting started
### Prerequisites
You’ll need node in version 8:

	curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.5/install.sh | bash
	nvm install 8
and yarn

	npm install -g yarn

and lerna

	npm install -g lerna

### Cloning the repository

    git clone git@github.com:eclipsesource/graphical-lsp.git
    cd graphical-lsp
    
    
### Building the client components
	cd client
	yarn 
	
### Building the server components
	cd server
	mvn clean install
	
### 1. Starting the GLSP Server
Once the server is built with `mvn clean install -Pfatjar` -- note the activation of the profile `fatjar`, you should have a jar file `server/example/workflow-example/target/workflow-example-X.X.X-SNAPSHOT-glsp.jar` whereas `X.X.X` is the current version. You can now start the server by executing the following commands:

	cd server/example/workflow-example/target
	java -jar workflow-example-X.X.X-SNAPSHOT-glsp.jar com.eclipsesource.glsp.example.workflow.ExampleServerLauncher

To start the example server from within your IDE, run the main method of the class [ExampleServerLauncher.java](https://github.com/eclipsesource/graphical-lsp/blob/master/server/example/workflow-example/src/main/java/com/eclipsesource/glsp/example/workflow/ExampleServerLauncher.java) in the module `server/example/workflow-example`.

### 2. Starting the theia client
Once the server is running, you can go ahead and start the theia client:

	cd client/examples/workflow/browser-app
	yarn start

and then open http://localhost:3000 in the browser.

### Testing the example
The example workspace should be opend automatically on Theia launch. This workspace constains the file "example1.wf". You can display this file in the Workflow Digram editor via context menu (Open with -> Workflow Diagram)

## Contributing to the Graphical LSP project
We'd be thrilled to receive your contribution! Please feel free to open issues, fork this repo, and/or open pull requests. Note that we will ask you to sign a [CLA](https://cla-assistant.io/eclipsesource/graphical-lsp) to ensure all contributions can be distributed under the terms of the following open-source licenses: Apache License 2.0, BSD 2/3 License, MIT License, and Eclipse Public License v2.0.

## Development

### Building in VSCode

The build task *Build all packages* of the VSCode workspace in `client` performs `yarn`. This build task is also marked as the default build task of this workspace. Thus, to perform a full build in VSCode, you can simply click the menu *Terminal --> Run Build Task...*, or press <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>B</kbd> (unless you have changed the keybinding for invoking a build in VSCode), or use the command palette task *Tasks: Run Build Task*.

### Watching

To avoid having to perform a full build after each change, you can use the following workflow *in VSCode* to enable watching and automatic rebuilding.

As a prerequisite, perform a full build once (<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>B</kbd> or `cd client; yarn`; see above). Now perform the following steps to watch and automatically build on every file change in any package.

1. Start the browser backend: start the launch configuration *Start Browser Backend* by invoking *Debug: Start Debugging*, or by switching to *Debug* perspective and select *Start Browser Backend*, or via the command palette *Tasks: Run Task --> Start Browser Backend for Workflow Example*.
2. Start watching all packages: run the task *Watch all packages* via the command palette *Tasks: Run Task --> Watch all packages* or via the menu *Terminal --> Run Task... --> Watch all packages*.

Alternatively, you can use the *command line* workflow detailed below.

1. Start the browser backend:
   
   ```
   cd client/examples/workflow/browser-app
   yarn start:debug
   ```
2. In a new terminal, invoke the following command to watch all packages:
   
   ```
   cd client
   yarn watch
   ```

---
_Source: https://npm.io/package/@glsp/theia-integration · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
