Helidon Extension for Visual Studio Code
By: Andrey Serkes
Tags: Extension, Visualstudio, Vscode, Oracle, Helidon

Create a Helidon Project in Visual Studio Code

Many IDEs offer wizards to create a new project of one type or another. Our extension uses Maven for this and it supports all archetypes that are available for Helidon. So, to create a new project, we just have to go through a few simple steps :

1. Open Command Palette by shortcut you are using (default: Ctrl+Shift+P) or choose in menu View > Command Palette…

You will see an interactive window where you can type your commands.

2. Start typing Helidon :

3. Choose Helidon: Generate a Helidon project . After this step we start wizard that collect all required data to generate Helidon project.

4. Choose which type of Helidon project you want to create from the list of available projects:

5. Follow the generator until the end and provide all the necessary information that will help the extension create a maven project for you (group Id, project artifact Id, root project package name for your project, and so on).

6. You will receive messages during the process, and a request asking where you want to open the project:

After these steps your new project is generated and Visual Studio Code will open it for you.

You receive a template of the project that contains all that you need to run the project even without writing any code.

You can add new classes, write tests, add dependencies that you need and implement all the ideas that you have.

During the development cycle you may need to check some details on a running application. Helidon has great feature for this called Helidon CLI. It performs continuous compilation and application restart, so you can easily iterate over source code changes.

Start Helidon CLI in VS Code

1) Open Command Palette (Ctrl+Shift+P or throug the menu)

2) Start typing Helidon

3) Choose Helidon: Start Helidon dev

4) If workspace contains only one Helidon project, Helidon CLI starts automatically. If workspace contains more than one helidon project, you will be asked to choose a directory that contains the project for which you want to start Helidon CLI :

5) If you need to run another Helidon application, you have to go through steps 1–4 again for the other project. There are no limits on how many Helidon applications can be run.

You will find the server logs in the bottom panel in the Output tab. You can select a server to show the logs by selecting the project directory in the drop-down list.

Stop Helidon CLI in VSCode

If you want to stop the running application, you have to go through similar steps:

1. Open Command Palette

2. Start typing Helidon

3. Choose Helidon: Stop Helidon dev

4. If workspace contains only one running Helidon application, Helidon CLI stops automatically. If workspace contains more than one running Helidon project, you will be asked to choose a directory to stop Helidon application.

Conclusion

At the moment this is all the functionality that our extension has, but as I mentioned before, it is developing and new features will be available soon.

The project is open for changes, so if you want to collaborate you can make you pull requests on the page https://github.com/oracle/helidon-build-tools/pulls”>helidon-build-tools.

The sources of the project can be found in the official Helidon repository in the module ide-support. You can find all the information on how to build and test the extension in our documentation.

If you have any suggestions on how to improve the extension, or if you need help using it, let us know on our Slack channel or report an issue on our issue tracker .