July 17th, 2022
0 reactions

Java on Visual Studio Code Update – July 2022

Senior Program Manager

Hi everyone, welcome to the July update of Visual Studio Code Java. We have brought exciting updates on Lombok support as well as a few other fundamental user experience improvements. Let’s get started!

Lombok Support

Lombok is a popular Java library that makes your coding life easier, and we have been consistently hearing from developers that our extensions don’t work well when they have Lombok dependency in their projects. Starting from a few months ago, we started investigating this and now we have fully enabled built-in support for Lombok within our extensions. You shouldn’t experience any weird issues with Lombok anymore.

We are also aware of the fact that some developers already install the community-developed Lombok extension, the original author @GabrielBB is moving on from the project, so Microsoft will maintain the extension from now on. We want to thank @GabrielBB who started it all and provided the original support for Lombok. We will add new features into this extension if necessary.

Let’s talk about the built-in support we have added for Lombok.

Enable Lombok support and user notification

When a project is opened for the first time, and if our extension detects that there is a Lombok dependency. We will send a notification to remind the developer if Lombok support needs to be enabled. After reloading Visual Studio Code, Lombok support becomes available. Here is a short demo.

Enable Lombok Support

Manage Lombok Version in the Language Status Bar

After enabling the Lombok support, the developer can see the current Lombok version and status in the language status bar. If the developer click on the item, it will take the developer to where the Lombok version is configured, this will easily allow the developer the change Lombok version.

After changing the Lombok version, there will be another notification require the developer to reload Visual Studio Code again. Here’s another demo to show this feature.

Change Lombok Version

Lombok Support Setting

If the developer does not want the built-in Lombok support, we have added a setting where it can be toggled on/off. Simply go to the settings and search for “lombok”. Here is a screeshot.