Red Hat Java Tool for VS Code Released in Version 1.0

Five years in the making, a Visual Studio Code extension providing Java language support from Red Hat has shipped in version 1.0.

The Language Support for Java by Red Hat extension, like many in the VS Code marketplace, leverages an open source language server (Eclipse JDT Language Server) to provide language-specific features and functionality when working on Java files.

It has already been installed some 12.4 million times and is among the top 10 most popular VS Code marketplace offerings, which speaks to the community gravitas of the extension, which was announced back in September 2016, sporting this "modest" feature list:

  • Maven based project support
  • As you type compilation error reporting
  • Code completion
  • Javadoc hovers
  • Code outline
  • Code navigation
  • Code lens for references
  • Highlights
  • Code formatting

Over the years that feature list has steadily grown, with one of the new features in the v1.0 release being type hierarchy, described as "one of the top asks in the Java community." It allows developers to view type hierarchy in class, supertype, or subtype view.

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

With the addition of type hierarchy and more, the tool's feature list now looks like this:

  • Supports code from Java 1.5 to Java 17
  • Maven pom.xml project support
  • Basic Gradle Java project support (Android not supported)
  • Standalone Java files support
  • As-you-type reporting of parsing and compilation errors
  • Code completion
  • Code/Source actions / Refactoring
  • Javadoc hovers
  • Organize imports
    • triggered manually or on save
    • when pasting code into a java file with Ctrl+Shift+v (Cmd+Shift+v on Mac).
  • Type search
  • Code outline
  • Code folding
  • Code navigation
  • Code lens (references/implementations)
  • Highlights
  • Code formatting (on-type/selection/file)
  • Code snippets
  • Annotation processing support (automatic for Maven projects)
  • Semantic selection
  • Diagnostic tags
  • Call Hierarchy
  • Type Hierarchy

The tool comes bundled with others for Java, wrapped up in the Extension Pack for Java, still in preview with some 9.8 million installs.

"Over the past few years, Microsoft have been working together closely with Red Hat and adding new features to this language server," said Nick Zhu, senior program manager, in an Oct 20 announcement. "We have also been fine-tuning the performance of the language server and improving the stability by addressing issues and bugs.

"In addition to the main Java language support, we have built various Java extensions based on the language server and expanded the Java tooling features on Visual Studio Code including project management, build tools support for Maven/Gradle, and better testing support. Our goal behind is to provide the best Java development experience possible on Visual Studio Code."

His list of highlights for the release includes Java 17 support, performance improvements, basic Gradle Kotlin support and more.

For future development, some planned improvements include:

  • Make it easier to configure compiler error/warnings and code formatting options
  • More useful auto-completion suggestions (eg. Postfix completion)
  • Keep adopting convenient code actions (eg. new Java language features) and eventually reach feature parity with those provided by the Eclipse Java IDE
  • Further improving the overall performance of the language server and startup time
  • Embedding a Java runtime in the extension to improve the overall "Getting Started" experience

"We believe the 1.0 release of the language support for Java by Red Hat is an important step for the overall Java journey on Visual Studio Code, and we still have a long way to go," Zhu said. "Going forward, we plan to collaborate with Red Hat and invest in fundamental Java language support and we are committed to delivering an outstanding Java development experience."

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus


Subscribe on YouTube