Coder Social home page Coder Social logo

ivy-cst / graphical-lsp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eclipsesource/graphical-lsp

0.0 1.0 0.0 23.14 MB

The Graphical Language Server Framework provides extensible components to enable editable diagrams in web-applications

License: Eclipse Public License 2.0

Java 78.44% TypeScript 20.41% CSS 0.53% Shell 0.26% HTML 0.04% JavaScript 0.11% CoffeeScript 0.16% Dockerfile 0.04%

graphical-lsp's Introduction

Graphical Language Server Protocol Framework Build Status

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) is work in progress and developed in collaboration among TypeFox, Obeo, and EclipseSource. It follows the same architectural pattern as the 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 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

For more information, you can also watch the EclipseCon Europe 2018 talk or look at the slides of this talk.

Build artifacts

The client packages are available via NPM.

The server packages are available as maven repository or p2 update site.

Maven Repositories

P2 Update Sites

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 [email protected]: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 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 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 Ctrl + Shift + B (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 (Ctrl + Shift + B 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
    

graphical-lsp's People

Contributors

camilleletavernier avatar dependabot[bot] avatar eneufeld avatar gabrieldulca avatar ivy-cst avatar lucas-koehler avatar martin-fleck-at avatar planger avatar rschnekenbu avatar tanjaem avatar tortmayr avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.