News

Java on VS Code Adds Gradle Tool, Simplifies Code Actions

The latest monthly update to Java on Visual Studio Code adds a Gradle extension, simplifies Code Actions execution and leverages an "important milestone," the v1.0 release 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 the latter item: the Language Support for Java by Red Hat extension. Like many similar tools in the VS Code marketplace, it leverages an open source language server (in this case, Eclipse JDT Language Server) to provide language-specific features and functionality when working on Java files.

"The 1.0 release of the Language Server for Java was officially released recently!" said Nick Zhu, senior program manager, in an Oct. 29 post. "We believe this is an important milestone and result of a multi-year collaboration between Microsoft and Red Hat."

You can read all about that in the article, "Red Hat Java Tool for VS Code Released in Version 1.0."

Another new tool, which provides Grade build automation functionality for 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 VS Code Task," says the item description in the Visual Studio Code Marketplace. "The extension also offers better Gradle file (e.g. build.gradle) authoring experience including syntax highlighting, error reporting and auto completion. The extension works nicely alongside other Java extensions in the Extension Pack for Java."

However, it is not yet bundled with that extension pack, Zhu said, so it may have to be downloaded separately.

"Better Gradle support has been one of the top asks in the community," he said. "This extension was originally started by @badsyntax and is now maintained by Microsoft."

He highlighted features including local Gradle installation support, a project dependency view, Gradle file authoring in Groovy, auto completion, syntax highlighting and many more.

Quicker Code Actions in Action
[Click on image for larger, animated GIF view.] Quicker Code Actions in Action (source: Microsoft).

As far as the simplified Code Actions -- used for refactorings and Quick Fixes of detected issues -- they can now be more quickly launched with the Quick Fix lightbulb icon, whereas before a coder had to right-click and select "Source Action" in order to find all the Java code actions in the menu. Supported scenarios for this functionality -- demonstrated 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 an editor and writer for Converge360.

comments powered by Disqus

Featured

  • Simulated Annealing Optimization Using C# or Python

    Dr. James McCaffrey of Microsoft Research shows how to implement simulated annealing for the Traveling Salesman Problem (find the best ordering of a set of discrete items).

  • New Lightweight JetBrains Editor Draws VS Code Comparisons

    Software development tooling vendor JetBrains debuted a new lightweight code editor that can act like a full-fledged IDE, immediately drawing comparisons to Microsoft's Visual Studio Code.

  • WinUI 3 Team Asked About Delayed Open Source Plans: 'What Happened?'

    A developer asked Microsoft's WinUI 3 dev team about delayed open source plans for the nearly two-year-old project that serves as the company's next-gen UI library for creating Windows apps.

  • Black White Wave IMage

    New Azure AI VMs Immediately Claim Top500 Supercomputer Rankings

    Visual Studio coders who dabble in artificial intelligence projects can now take advantage of new Azure virtual machines (VMs) featuring 80 GB NVIDIA GPUs that immediately claimed four spots on the TOP500 supercomputers list, Microsoft said.

Upcoming Events