Java on VS Code Adds Gradle Tool, Simplifies Code Actions – Visual Studio Magazine


Java on VS Code Adds Gradle Tool, Simplifies Code Actions

Java’s latest monthly update on Visual Studio Code adds a Gradle extension, simplifies execution of code actions, and takes advantage of a “milestone,” version v1.0 of a new language server developed with Red Hat.

Java on VS Code – the team behind the super-popular Extension pack for Java and much more – already announced this last element: the Language support for Java by Red Hat extension. Like many similar tools on the VS Code market, it relies on an open source language server (in this case, Eclipse JDT language server) to provide language-specific features and functionality when working with Java files.

“Language Server for Java version 1.0 was officially released recently! Said Nick Zhu, Senior Program Director, in a Publish. “We believe this is an important milestone and the result of a multi-year collaboration between Microsoft and Red Hat.

You can read all about it in the article “The Red Hat Java Tool for VS Code Released in Version 1.0”.

Another new tool, which provides functionality to automate note generation to Java developers, is the aptly named Gradle for Java extension.

“You can use this interface to view Gradle tasks and project dependencies, or run Gradle tasks as a VS code task,” the item description in Visual Studio Code Marketplace reads. “The plugin also provides a better experience for creating Gradle files (eg build.gradle), including syntax highlighting, error reporting, and auto-completion. The plugin works well with d ‘ other Java extensions in the Extension Pack for Java. ”

However, it does not yet come with this expansion pack, Zhu said, so it may need to be downloaded separately.

“Better support from Gradle has been one of the main demands of the community,” he said. “This extension was originally released by @poor syntax and is now maintained by Microsoft. ”

It highlighted features like support for local Gradle installation, a view of project dependencies, creating Gradle files in Groovy, auto-completion, syntax highlighting and much more. ‘others.

Faster code actions in action
[Click on image for larger, animated GIF view.] Faster code actions in action (source: Microsoft).

As for the simplified code actions – used for refactorings and quick fixes of detected issues – they can now be initiated faster with the Quick Fix bulb icon, whereas previously an encoder had to click with the button right and select “Source action” in in order to find all the actions of the Java code in the menu. Supported scenarios for this feature – shown in the animated GIF above – include:

  • Generate getters and setters
  • Generate hashCode () and equals ()
  • Generate toString ()

Developers can learn more about Java on Visual Studio Code at Java on Visual Studio Code.

About the Author

David Ramel is editor and writer for Converge360.

Comments are closed.