News

Java on Visual Studio Code Fixes Lombok Library Issues

The big news in the July 2022 update to Microsoft's Java on Visual Studio Code extensions is that they all now fully support the Lombok library.

Project Lombok is designed to reduce boilerplate code, the amount of which is historically notorious in many Java projects. Lombok uses annotations for this task in order to streamline things like coding getters and setters. The extension has been installed more than 541,000 times, earning an average 4.3 rating (scale 0-5) from 17 developers who reviewed it.

While the library has been used by Java coders in VS Code, that use was fraught with problems when combined with the Java on VS Code dev team's tooling. Now, Microsoft has cleaned things up and is taking over the community-developed extension from original author Gabriel Basilio for maintenance and new feature development as needed.

"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," Microsoft's Nick Zhu, senior program manager, in a July 17 announcement. "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."

Lombok Support in Animated Action
[Click on image for larger, animated GIF view.] Lombok Support in Animated Action (source: Microsoft).

With the built-in support of Lombok, developers:

  • Will be reminded that Lombok support needs to be enabled when they open a project for the first time and the dev 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 the Lombok support, while licking on the item takes the developer to where the Lombok version is configured, letting them easily change the Lombok version
  • Can toggle Lombok support on and off with a new setting

Beyond the Lombok support, the team sought to improve the user experience with:

  • Drag-and-drop support in the Java Project explorer
  • A new setting that lets developers disable inlay hints under some 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 the Quick fix prompt

Zhu also announced another improvement to Spring functionality: the bean dependency view. "As a Spring developer, bean dependency is something that we deal with very often and sometimes we might want to visualize that," he said. "We added this feature to 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 two directions. You can either see what this bean is injected into, or see what this bean is depending on."

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Hands On: New VS Code Insiders Build Creates Web Page from Image in Seconds

    New Vision support with GitHub Copilot in the latest Visual Studio Code Insiders build takes a user-supplied mockup image and creates a web page from it in seconds, handling all the HTML and CSS.

  • Naive Bayes Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the naive Bayes regression technique, where the goal is to predict a single numeric value. Compared to other machine learning regression techniques, naive Bayes regression is usually less accurate, but is simple, easy to implement and customize, works on both large and small datasets, is highly interpretable, and doesn't require tuning any hyperparameters.

  • VS Code Copilot Previews New GPT-4o AI Code Completion Model

    The 4o upgrade includes additional training on more than 275,000 high-quality public repositories in over 30 popular programming languages, said Microsoft-owned GitHub, which created the original "AI pair programmer" years ago.

  • Microsoft's Rust Embrace Continues with Azure SDK Beta

    "Rust's strong type system and ownership model help prevent common programming errors such as null pointer dereferencing and buffer overflows, leading to more secure and stable code."

  • Xcode IDE from Microsoft Archrival Apple Gets Copilot AI

    Just after expanding the reach of its Copilot AI coding assistant to the open-source Eclipse IDE, Microsoft showcased how it's going even further, providing details about a preview version for the Xcode IDE from archrival Apple.

Subscribe on YouTube

Upcoming Training Events