Select Git revision
package.xml
README.md NaN GiB
# PNML-Editor
## Prerequisites
The following libraries/frameworks need to be installed on your system:
- [Node.js](https://nodejs.org/en/) `>=16.11.0`
- [Yarn](https://classic.yarnpkg.com/en/docs/install#debian-stable) `>=1.7.0 <2.x.x`
- [Java](https://adoptium.net/temurin/releases) `>=17`
- [Maven](https://maven.apache.org/) `>=3.6.0`
The examples are heavily interweaved with Eclipse Theia, so please also check the [prerequisites of Theia](https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#prerequisites).
## Theia Version compatibility
This project template is compatible with Theia `>=1.39.0`.
## Building the Editor
The server component is built with `maven` and the client component is built with `yarn`.
A convenience script to build both is provided.
To build all components execute the following in the directory containing this README:
```bash
yarn build
```
In addition, it is also possible to build each component individually:
```bash
# Build only the glsp-client
yarn build:client
# Build only glsp-server
yarn build:server
```
Or you can use the available VSCode tasks configured in the [workspace](java-emf-theia-example.code-workspace) (via Menu _Terminal > Run Task..._)
- `Build TaskList GLSP Server`
- `Build TaskList GLSP Client example`
## Running the Editor
To start the Theia browser application with the integrated tasklist example, navigate to the client directory
```bash
cd glsp-client
```
and then execute:
```bash
yarn start
```
This will launch the example in the browser with an embedded GLSP server on [localhost:3000](http://localhost:3000).
From there the file `glsp-client/workspace/example.pnml` can be opened.
### Watch the TypeScript packages
To run TypeScript in watch-mode so that TypeScript files are compiled as you modify them via CLI:
```bash
yarn watch
```
or the VSCode task `Watch TaskList GLSP Client example`.
## MQTT Messages
The broker can be changed by modifying the "broker" filed in the class
`glsp-server/src/main/java/org/eclipse/glsp/example/javaemf/MQTT/MQTTClient.java`
Three different kinds of messages can be sent:
- filling places with tokens
- topic name: `fillPlace`
- topic JSON format: {"placeId": _place id as string_, "tokens": _array of token strings_}
- example: `{"placeId": "cd0bae27-ab7a-4647-85d3-b1bb2b3dcd60", "tokens": ["aaaa", "bbbb"]}`
- firing transitions
- topic name: `fireTransition`
- topic JSON format: {"transitionId": _transition id as string_, "tokens": {_placeId_: _Array of token strings_}}
-example: `{"transitionId": "7c12def4-f37f-4948-96c7-a248088d1bee", "tokens": {02cb7814-11e3-496b-9d6a-4be829073826: ["Hund", "Katze"], "c784ac65-fd96-4158-9ba2-c27527a5d69e": ["Dativ"]}}`
- changing the value of input signals
- topic name: _name of the signal_
- topic format: _Boolean value_
- example: topic: "Red" ; content: "true"
The examples can be executed as they are on the example in the workspace folder.
## Tina
The repository does not contain the bin files of tina. They have to be manually added to the appropriate location in `libs/tina-3.8.0`. Tina functionality has not been tested on linux.