Microsoft says there are no more “strange issues” with VS Code and Lombok’s popular Java library • DEVCLASS

Microsoft has taken over the maintenance of the vscode-lombok extension, originally created by Gabriel Basilio, which supports the use of Project Lombok in VS Code. Additionally, the Red Hat Java Language Extension for VS Code now supports Lombok by default, following a merge late last month.

The Red Hat Java language extension for VS Code now has built-in Lombok support

Project Lombok allows developers to write more concise code using annotations. An example is the @Getter/@Setter annotation, which automatically generates a getter, a setter, and a matching field. Unlike IDE tools that generate code, the Lombok annotations are preserved as annotations, so the code stays concise. That @data annotation is another example of combining multiple Lombok annotations into one, allowing multiple fields, getters, and setters to be added to a class in one line of code.

Lombok is a long-established project and understandably popular with Java developers, but it has been problematic for those using VS Code. It’s a challenge for the IDE because Lombok works at compile time while static analysis tools look at the Java code in the editor. Problems included the Java language server crash, repeated out-of-memory errors, and incorrect code highlighting.

Senior Program Manager Nick Zhu has Posted Recent extension improvements mean that “you shouldn’t have any more weird problems with Lombok”. Basilio has moved away from the vcode-lombok extension, he added, and “Microsoft will maintain the extension from now on,” including adding new features as needed.

Other new features in VS Code’s Java support include the ability to drag and drop classes between packages, function breakpoints (break on specific methods without having to manually set multiple breakpoints), and additional “quick fix” code actions to generate code .

While VS Code is the most popular IDE overall, this is probably not the case for Java development. Corresponding this report, based on job postings, Stack Overflow questions, and Google searches, Eclipse is the most popular Java IDE, followed by JetBrains IntelliJ and VS Code in third place. This is not surprising considering that both Eclipse and IntelliJ were built with Java. Still, Red Hat’s Java language extension for VS Code reports nearly 17 million downloads, and developers can put up with inferior Java support because they like using the same IDE in multiple languages, or have projects that use Java and JavaScript or TypeScript with VS Code combining is strong.

Comments are closed.