Skip to content

harmen-xb/ecore-glsp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ecore-glsp

Build Status

For more information, please visit the EMF.cloud Website. If you have questions, contact us on our discussions page and have a look at our communication and support options.

Ecore GLSP provides a web-based editor for Ecore Models (including Diagrams), integrated with Eclipse Theia. It contains two components: one GLSP language server (Server-side, written in Java), and one GLSP client extension to actually present the diagrams (Using Sprotty).

Ecore GLSP can display an existing Ecore model. The diagram layout will be persisted in an .enotation file next to the .ecore file. The diagram editor also supports creation of new elements (EClasses, EAttributes, EReferences...), as well as partial support for editing existing elements (Renaming, deleting...).

Ecore GLSP Example

Prerequisites

Java

You need Java 11 to build the ecore-glsp editor.

Getting started

Clone the ecore-glsp editor:

git clone https://github.com/eclipse-emfcloud/ecore-glsp.git

If you only want to run ecore-glsp without installing all needed dependencies on your machine, we would advise to follow the Docker instructions.

Build server and client with the following build-script. This script also copies the needed server artifacts to the client.

cd ecore-glsp
./build.sh

Run

  • Start the client as it is described in the client README.
  • The copied backend artifacts are automatically launched on startup.
  • If you want to start the backends manually:
    • Execute the Java main classes: org.eclipse.emfcloud.ecore.glsp.EcoreServerLauncher and/or org.eclipse.emfcloud.ecore.modelserver.EcoreModelServerLauncher
    • On the client run yarn start:debug or the launch config Start Browser Backend (expects running GLSP Server instance)

Building and deploying via Docker

The client repo contains a Dockerfile, that builds the entire client application. The image listens on 0.0.0.0:3000 for incoming requests from a browser.

For installing docker locally please consult docker's installation description for your OS.

Locally build backend

Make sure to only build the backend (and not the front-end). This is needed before building the docker image.

build.sh -b

Building docker image

Build the docker image using the following command, where <imagename> and <tagname> are replaced with the values you wish to use.

docker build -t <imagename>:<tagname> .

For example: docker build -t ecore-glsp:latest ./client/

Running in docker

When the docker image is build, you can start the container using the following command (where again the <imagename> and <tagename> are replaced).

docker run -it -p 3000:3000 --rm <imagename>:<tagname>

For example: docker run -it -p 3000:3000 --rm ecore-glsp:latest

After that you should be able to connect with your browser at http://localhost:3000.

Working in your local workspace folder

When the above is all working and want to start in your own workspace folder you can mount any folder on your machine in the docker container by adding the following part in the docker command:

-v <local-path>:<remote-path>

For example, on Windows, if you want to mount C:\my-workspace on your machine to /usr/src/my-workspace in the docker container it would be: -v C:\my-workspace:/usr/src/my-workspace

The full command in the above example would be:

docker run -it -p 3000:3000 --rm -v C:\my-workspace:/usr/src/my-workspace ecore-glsp:latest

Now when the image has started you can go to 'File' > 'Open Workspace...' and browse to /usr/src/my-workspace to open your own workspace. Any change made using ecore-glsp will be visible in your local folder.

Tip: A shortcut to loading a specific workspace is adding the workspace path to the url. For example: http://localhost:3000/#/usr/src/my-workspace.

Releases

No releases published

Packages

No packages published

Languages

  • Java 59.2%
  • TypeScript 36.6%
  • CSS 3.1%
  • Other 1.1%