The vscode extension to validate java programs with refinement types.
- Open the client folder in terminal
code --install-extension liquid-java-0.0.1.vsix
- 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 liquidjava-api.jar
can be found in this project in the pathvscode-liquidjava\server\lib
- Run Client on Visual Studio Code:
- Open the client folder on terminal
npm install
- Open client folder on Visual Studio Code.
- Make sure you have the redhat extension for Language support for Java ™ installed and enabled.
- The code in
extension.ts
must be the same as the code inextension_test.ts
- Go to
Run-> Run Extension
(or pressF5
). A new window appears with the liquidjava extension enabled. - Open a Java project. If the project contains the
liquid-java-api.jar
then the liquidjava verification will start in a few seconds.
Server and Client connect through sockets and run in different environments that allow a better debugging
- Run Server on Eclipse:
- Open Eclipse.
- Import the Maven project that is in the server folder.
- Run
App.java
with a port as argument.
- Run Client on Visual Studio Code:
- Open client folder on VSCode
- Copy all the code on file
extension-network.ts
toextension.ts
. - Go to Run-> Run Extension (or press F5). A new vscode appears to use the extension.
When the server is ready to be exported, export the jar. In Eclipse follow the steps:
- Inside eclipse make
File > Export > Runnable JAR file
. - In lauch configuration choose
main - vscode-liquid-java-server
. - In the output path choose the
client/server
folder of this extension. It should look like:$USER$\vscode-liquidjava\client\server\language-server-liquidjava.jar
- The name of the jar must be
language-server-liquidjava.jar
for the client to be able to call it on Developer Mode.
Server - implements an LSP in Java for the LiquidJava language, using the library LSP4J.
Client - implements the vscode client for the LiquidJava Server. The client depends on Language support for Java ™ for Visual Studio Code to enable all the Java errors outside the scope of LiquidJava.