Skip to content

Latest commit

 

History

History

README.md

Eclipse EMF.cloud - Project Template:
💾 Model Server ● 🖥️ Java GLSP-Server ● 🗂️ EMF ● 🖼️ Theia

GLSP Client Theia Application

This directory provides the initial setup of the package architecture and environment for a GLSP Client that is integrated into a Theia browser application. It is based on the TaskList example diagram language.

For more detailed instructions and information please confer to the README in the parent directory.

Building

To build all client packages simply execute the following in the client directory:

yarn

Running the example

To start the Theia browser application with the integrated TaskList example execute:

yarn start

It's also possible to start the Theia browser application in external mode. This means the TaskList GLSP server will not be started as an embedded process and is expected to be already running. This can be used for debugging purposes, where you first start the GLSP server in debug mode and let the Theia application connect to it:

yarn start:external

The Theia application backend pings the Model Server and if it is not read, the Theia backend will startup an embedded instance.

Debugging the example

To debug the involved components launch configs are available in the Run and Debug view (Ctrl + Shift + D). Here you can choose between four different launch configurations:

  • Launch TaskList Theia Backend [DEBUG] (Embedded GLSP Server)
    This config launches the Theia browser backend application and will start the GLSP server as embedded process which means you won't be able to debug the GLSP Server source code. Breakpoints in the source files of the client/**/node directories will be picked up.
  • Launch TaskList Theia Backend [DEBUG] (External GLSP Server)
    This config launches the Theia browser backend application but does not start the GLSP server as embedded process. Breakpoints in the source files of the client/**/node directories will be picked up. It expects that the GLSP Server process is already running and has been started externally.
  • Launch Theia Frontend [DEBUG]
    Launches a Google Chrome instance, opens the Theia browser application at http://localhost:3000 and will automatically open an example workspace that contains a example.tasklist file. Double-click the file in the Explorer to open it with the TaskList Diagram Editor. Breakpoints in the source files of the client/**/browser directories will be picked up.

NOTE:  Due to bug GLSP-666 the launch configurations for the Theia Backend might not work as expected when using Windows. Unfortunately there is currently no work-around and if you encounter this bug you won't be able to debug the Theia backed.

Watching the example

To run TypeScript in watch-mode so that TypeScript files are compiled as you modify them execute:

yarn watch

Using preconfigured tasks

Alternatively to executing these commands manually, you can also use the preconfigured VSCode tasks (via Menu Terminal > Run Task...):

  • Build TaskList GLSP Client example
  • Watch TaskList GLSP Client example
  • Start TaskList Example Theia Backend (Embedded GLSP Server)
  • Start TaskList Example Backend (External GLSP Server)

More information

For more information, please visit the EMF.cloud Umbrella repository, EMF.cloud Website, Eclipse GLSP Umbrella repository and the Eclipse GLSP Website. If you have questions, please raise them in the EMF.cloud discussions page or the Eclipse GLSP discussions page and have a look at our communication and support options.