Examples to use with LiquidJava
Contains Java projects without LiquidJava. Open one of the folders on VSCode and find the error.
Contains LiquidJava projects.
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.
Contains Java files to be annotated with LiquidJava.
- Variable.java - Add the annotation and check the correct and wrong assignment
- TrafficLight.java - Add the annotations on the fields and model the state using
@StateSetand@StateRefinement. To check if the modelling is correct, uncomment the fileTestTLCorrect.java(that should be correct) and then uncomment the fileTestTLWrong.javathat should present an error.
- Open the terminal on the extension folder
code --install-extension liquid-java-0.0.X.vsix, where X is the current version of the extension- Ensure that VSCode has the redhat extension for Language support for Java ™ installed and enabled (Java 11 is the minimum required for this extension to run).
- 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.
- 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.
liquidjava-jars folder contains the api and verifier jars.