Java on Visual Studio Code Fixes Lombok Library Issues – Visual Studio Magazine
Java on Visual Studio Code fixes Lombok library issues
The big news in the July 2022 update of Java Extensions to Microsoft’s Visual Studio Code is that they all now fully support the Lombok library.
The Lombok project is designed to reduce boilerplate code, the amount of which is historically notorious in many Java projects. Lombok uses annotations for this task to streamline things like coding getters and setters. The extension has been installed over 541,000 times, earning an average rating of 4.3 (0-5 scale) from 17 developers who reviewed it.
Although the library was used by Java coders in VS Code, this use was fraught with pitfalls when combined with tools from the Java Development Team on VS Code. Now, Microsoft has cleaned things up and is taking over the community-developed extension from original author Gabriel Basilio for maintenance and developing new features as needed.
“Lombok is a popular Java library that makes your coding life easier, and we’ve constantly heard from developers that our extensions don’t work well when they have a dependency on Lombok in their projects,” said Nick Zhu, Senior Manager of the program at Microsoft, in a July 17 announcement. “A few months ago we started investigating this issue and have now fully enabled built-in Lombok support in our extensions. You shouldn’t experience any weird issues with Lombok anymore.”
With Lombok’s built-in support, developers:
- They will be reminded that Lombok support must be enabled when they first open a project and the development team’s Java extension sees that the project has a Lombok dependency
- Can see the current Lombok version and status in the language status bar after enabling Lombok support, while licking the item takes the developer to where the version of Lombok is configured, allowing him to easily change the version of Lombok
- Can enable and disable Lombok support with new setting
Beyond Lombok support, the team sought to improve the user experience with:
- Drag and drop support in Java Project Explorer
- A new setting that allows developers to disable overlay hints under certain circumstances
- The ability to set a function breakpoint by clicking the “+” button in the Breakpoints view and entering a fully qualified method name from a Java class
- More code actions for quick fix prompt
Zhu also announced another Spring feature enhancement: the bean dependency view. “As a Spring developer, bean dependency is something we deal with very often and sometimes we might want to visualize it,” he said. “We have added this feature to the Spring Boot Dashboard. It will become available when you launch the application from the Spring Boot Dashboard and click the inline button on the right. From there you can go to two directions. You can either see what this bean is injected with, or see what this bean depends on.”
David Ramel is an editor and writer for Converge360.