|
1 | 1 | # liquidjava-examples |
2 | | -Examples to use with LiquidJava |
| 2 | +Examples to use with [LiquidJava](https://catarinagamboa.github.io/liquidjava.html) |
3 | 3 |
|
4 | | -## Install Visual Studio Code Extension |
5 | | -1. Open the terminal on the extension folder |
6 | | -2. `code --install-extension liquid-java-0.0.1.vsix` |
7 | | -3. Ensure that VSCode has the redhat extension for [Language support for Java ™](https://marketplace.visualstudio.com/items?itemName=redhat.java) installed and enabled (Java 11 is the minimum required for this extension to run). |
8 | | -4. Open Visual Studio Code and open a Java project (with src folder inside). If the project contains the liquidjava-api.jar then the extension will be activated, otherwise the LiquidJava verification is not applied. |
9 | | -5. The extension may take some time to be activated. While a small wheel in the bottom right of VSCode window is spinning the extension is being loaded. |
10 | | - |
11 | | - |
12 | | -## Using the examples |
13 | | -#### part3-liquidJava |
| 4 | +## Examples |
| 5 | +### part3-liquidJava |
14 | 6 | Contains LiquidJava projects. |
15 | 7 |
|
16 | 8 | Open one of the folders on VSCode with the extension running. Uncomment the code in the Test file and find the error. You can open the folder through the terminal by going to the correct path and typing `code` or open through the VSCode GUI. |
17 | 9 |
|
18 | | -#### part3-plainJava |
| 10 | +### part3-plainJava |
19 | 11 | Contains Java projects without LiquidJava. |
20 | | - |
21 | 12 | Open one of the folders on VSCode and find the error. |
22 | 13 |
|
23 | | -#### part4 |
| 14 | +### part4 |
24 | 15 | Contains Java files to be annotated with LiquidJava. |
25 | 16 | - **Variable.java** - Add the annotation and check the correct and wrong assignment |
26 | 17 | - **TrafficLight.java** - Add the annotations on the fields and model the state using `@StateSet` and `@StateRefinement`. To check if the modelling is correct, uncomment the file `TestTLCorrect.java` (that should be correct) and then uncomment the file `TestTLWrong.java` that should present an error. |
27 | 18 |
|
28 | 19 |
|
| 20 | +## Install Visual Studio Code Extension |
| 21 | +1. Open the terminal on the extension folder |
| 22 | +2. `code --install-extension liquid-java-0.0.X.vsix`, where X is the current version of the extension |
| 23 | +3. Ensure that VSCode has the redhat extension for [Language support for Java ™](https://marketplace.visualstudio.com/items?itemName=redhat.java) installed and enabled (Java 11 is the minimum required for this extension to run). |
| 24 | +4. Open Visual Studio Code and open a Java project (with src folder inside). If the project contains the liquidjava-api.jar then the extension will be activated, otherwise the LiquidJava verification is not applied. |
| 25 | +5. The extension may take some time to be activated. While a small wheel in the bottom right of VSCode window is spinning the extension is being loaded. |
| 26 | + |
| 27 | +## Download jars |
| 28 | +`liquidjava-jars` folder contains the api and verifier jars. |
0 commit comments