2 min

Tags in this article

, , ,

Visual Studio Code extends its support of the Java programming language. The tool now features a language server developed in cooperation with Red Hat and a Gradle extension.

Java remains one of the most popular programming languages. Thus, Java support in Microsoft’s Visual Studio Code (VS Code) development tool is important. Java is supported in VS Code using so-called extensions, providing developers with a lightweight and high-performance code editor that supports most Java development techniques.

The newly released Java functionality includes a version 1.0 extension of a language server developed in collaboration with Red Hat: Language Support for Java by Red Hat. The extension consists of an open-source language server (the Eclipse JDT Language Server) that provides programming language-specific features and functionality for working on Java files.

Support for Gradle build automation

Additionally, the ‘Gradle for Java’ extension adds support for so-called Gradle build automation functionality. The extension allows the developer interface to view Gradle Tasks and Project components, as well as the running of Gradle Tasks as a VS Code Task. Moreover, the extension introduces syntax highlighting, error reporting and auto-completion when coding Gradle files.

Gradle support has long been on the wish list of Java developers who use VS Code. The newly introduced extension was initially developed by @badsyntax and is now managed by Microsoft. Despite being compatible with various Java extensions in the Extension Pack for Java bundle, the Gradle extension is available through a separate download.

Code Actions

Lastly, Microsoft simplified Code Actions. Code Actions are primarily used for refactoring and the quick fixing of discovered problems. Now, the functionality can be activated faster with, for example, a Quick Fix icon. Before this, programmers had to manually perform a right mouse click and select ‘Source Action’ to find the appropriate Java code actions.