Code Monkey home page Code Monkey logo

glsp-examples's Introduction

Eclipse GLSP Examples Build Status

This repository contains code examples that demonstrate how to build diagram editors with the Graphical Language Server Platform (GLSP). The examples are focused on the integration of GLSP editors with the cloud-based Eclipse Theia IDE using the GLSP Theia integration and the Java based GLSP Server Framework.

Each example is self-contained and provides both, an example diagram client (glsp-client directory) and its corresponding GLSP server (glsp-server directory).

Prerequisites

The following libraries/frameworks need to be installed on your system:

The examples are heavily interwoven with Eclipse Theia, so please also check the prerequisites of Theia.

The web-based/client part of the examples has been developed using Visual Studio Code and the server/java part has been developed with the Eclipse IDE. However, it's of course also possible to use any other IDE or text editor.

Examples

  • Project Templates: The best starting point for your own diagram editor project. The project templates are available for several combinations of tool platform integrations (Theia, VS Code), source models (JSON, EMF) and servers (Node, Java). Please visit the GLSP documentation for more information.

  • Workflow Example: A consistent example provided by all GLSP components. It implements a simple flow chart diagram editor with different types of nodes and edges. The Workflow Example is the main example used for development and integrates all GLSP features

    diagramanimated.mp4

Building the examples & project templates

To build all examples & project templates simply execute the following in the repository root:

yarn build

In addition, it is also possible to build each example or template individually:

yarn build:workflow
yarn build:java-emf-theia
yarn build:node-json-theia
yarn build:node-json-vscode
yarn build:java-emf-eclipse

Running & Debugging the examples

Each example and project template contains a dedicated README with detailed instructions on how to run und debug them.

Debugging the Jave GLSP Server in Eclipse

All Java example GLSP servers are maven projects which can be imported directly into the Eclipse IDE. In contrast to the Java support in VS Code, Eclipse also offers Ecore tooling which is required to manipulate or extend the graph Ecore models (e.g. workflow-graph.ecore).

We recommend to use the Eclipse Modeling Tools package as it already provides most needed plugins out of the box. Only the M2E plugin has to be installed on top to enable maven support in Eclipse.

Use the file menu to import a glsp-server maven project into the Workspace ( File -> Import... -> Maven -> Existing Maven Projects). The projects also contain a launch configuration (<ExampleName>ServerLauncher.launch) to enable debugging via the Run menu.

Integration with other platforms

The general GLSP Client code is separated from the Theia specific glue code and located in a dedicated package with -glsp prefix (e.g. workflow-glsp). This package can be easily reused when the package should be integrated with any other platform. In addition to the Theia integration, GLSP provides the following glue code frameworks:

For a reference implementation of a example specific glue code package please checkout the project templates.

More information

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.

License

glsp-examples's People

Contributors

dependabot[bot] avatar jfaltermeier avatar koegel avatar martin-fleck-at avatar ndoschek avatar planger avatar tortmayr avatar xai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

glsp-examples's Issues

Yarn cache not available during CI build

The yarn cache folder is not readable during the CI build. This produces a lot of warnings and is probably also the reason why building the client takes longer than expected

Provide and use a top-left snapper

With #26 we use the CenterGridSnapper. However, this is not really ideal for the example, as all nodes have different widths as the width depends on the label. Thus, you can't horizontally align the nodes manually with this snapper anymore.

We should add and use a top-left-based snapper for such cases.

POM missing no dependency information available

The following error happens when I try to build the minimal example:

MacOs
Java version: 11.0.2
Node version: 12.14.1
Maven version: 3.6.3

[WARNING] The POM for org.eclipse.glsp:org.eclipse.glsp.server:jar:0.8.0-SNAPSHOT is missing, no dependency information available Downloading from sonatype: https://oss.sonatype.org/content/groups/public/org/eclipse/glsp/org.eclipse.glsp.server/0.8.0-SNAPSHOT/org.eclipse.glsp.server-0.8.0-SNAPSHOT.jar [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.379 s [INFO] Finished at: 2021-01-17T17:31:08+01:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project org.eclipse.glsp.example.minimal: Could not resolve dependencies for project org.eclipse.glsp.example:org.eclipse.glsp.example.minimal:jar:0.8.0: Could not find artifact org.eclipse.glsp:org.eclipse.glsp.server:jar:0.8.0-SNAPSHOT in sonatype (https://oss.sonatype.org/content/groups/public) -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

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.