Microsoft announces built-in Lombok support in VS Code for Java – ADTmag
Microsoft announces built-in Lombok support in VS Code for Java
The latest update to Microsoft’s popular Visual Studio Code (VS Code) source code editor for Java includes new built-in support for the Java library tool Lombok, as well as fundamental user experience improvements, a announced the company this week.
The Lombok project is designed to reduce boilerplate code, using annotations to streamline things like getters and setters. This approach also improves source code readability and saves space by reducing lines of code. Lombok adds the boilerplate codes at compile time in the “.class” file instead of the source code.
Although the Lombok library has been used by Java coders in VS Code, this usage has caused many problems when combined with tools from Java development teams 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.
The Lombok extension has been installed more than 541,000 times, earning an average rating of 4.3 (0-5 scale) from 17 developers who reviewed it, reported Nick Zhu, senior program manager at the developer division of Microsoft, in a recent blog post.
“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,” Zhu wrote. “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.