Seleziona la tua lingua
Red Hat is excited to announce that today we are shipping the 1.0 release of Language Support for Java by Red Hat on Visual Studio Code. The 1.0 release includes support for Java 17, type hierarchy and a number of performance improvements.
This is the product of a multi-year collaboration between Red Hat, Microsoft, and members of the Java developer community at large. This release would not have been possible without your help, and we appreciate everyone who has given us feedback or contributed to the project.
Since the start of the "Language Support for Java by Red Hat" (vscode-java) extension for VS Code, the goal has always been to provide the kind of Java support one would expect from any IDE. As we release version 1.0.0, it's a great opportunity to look back at how this project started, what has been accomplished, and plans for the future
The vscode-java extension started as an experiment by Red Hat's Gorkem Ercan in May 2016. The goal was to understand and evaluate Language Server Protocol (LSP) by implementing a Java Language Server using the building blocks of Eclipse IDE, a full blown Java IDE. The language server could be easily reused by any other IDE/editor implementing LSP.
The initial implementation for a Java language server was demoed during the DevNation keynote in June of 2016.
A couple weeks later, the Microsoft Visual Studio Code team hosted a Hackathon in Zurich, Switzerland, where engineers from Red Hat, Microsoft, CodeEnvy and IBM worked together for a week on what would ultimately become the first official release of "Language support for Java for Visual Studio Code" on the Visual Studio Marketplace.
For a few more months, subsequent releases were performed by a small Red Hat team, twice a month. At that point, vscode-java was really geared toward development of microservices applications, built with Maven or Eclipse.
In July 2017, the Java team at Microsoft contacted us to see if they could contribute debugging support for Java as an external extension. We then started to open up vscode-java to 3rd party extensions, by leveraging the plugin infrastructure of our underlying Eclipse-based language server.
The Microsoft team started contributing more and more features to the VS Code extension and the language server and are now equally driving the roadmap and features of our Java tooling. To this day a complete ecosystem of extensions is available for Java, including a debugger, test runner, lombok support, Spring Boot, Quarkus extensions, and more.
Since the very first release, the goal of the Java language support extension, has been to make VS Code more fun to use for Java developers. The initial release had a modest set of features, and we have continued to build upon that, releasing about 1-2 times per month. Listed below are a few of our recent accomplishments.
Java 17 Support
We are striving to support the latest language features and enhancements provided by the Java language.
New features in the LSP specification have allowed us to defer certain computations which result in better performance in a lot of use cases. Some better default JVM options while launching have allowed us to improve our experience on larger projects. We have also made and continue to make many smaller improvements to boost responsiveness.
A feature that was introduced fairly recently and has been missing for too long from the Java support in Visual Studio Code.
Being able to quickly locate the source code of a library is a really useful feature that we've had for some time. We've also brought it to unmanaged projects, so as long as your library comes from Maven Central, we can resolve sources. We also support more advanced configurations as well.
More Code Actions
We continue to adopt new code actions to improve the overall development experience.
Gradle Kotlin (.kts) Support
While we have existing support for Gradle projects using Groovy scripts, we heard the demand for Kotlin support and have taken steps to provide some basic support for this. We hope that going forward, we are able to expand upon this and deliver a good experience for this as well.
While it's easy to discuss accomplishments in terms of the many enhancements, and fixes provided, this project owes its growth to a variety of contributors spanning different ecosystems, and companies.
Looking at the VS Code Java extension, and language server, it's clear that Microsoft has helped us greatly maintain and bring new features to the extension. However, the language server itself also relies on components directly from the Eclipse IDE's Java tooling, which is also supported by IBM and various other companies. In addition to support from various companies, we also have individual contributors who have made significant feature contributions to the project as well.
Looking downstream, we also see the ecosystem of extensions for Java developers has grown considerably. We have "Debugger for Java", "Test Runner for Java", "Maven for Java", and "Project Manager for Java."
These all contribute their own capabilities on top of the base extension (vscode-java) and language server, while also being easy to install in one shot, through the "Extension Pack for Java." Other extensions like Quarkus, MicroProfile Tools, and Spring Boot Tools also provide support across various technologies.
To put it simply, it really does take a village to build nice things when your components are an intersection of many different technologies, and where there are many different interests.
There are many items planned for the Java language support in VS Code. Some of these include :
Make it easier to configure compiler error/warnings and code formatting options
Add useful auto-completion features (e.g. Postfix completion)
Continue to adopt convenient code actions (e.g. new Java language features) and eventually reach feature parity with those provided by the Eclipse Java IDE
Improving the language server initial startup time and overall performance
Embedding a Java runtime to improve the "Getting Started" experience
For more on this extension, check out our post on Red Hat Developer.
About the author
Mohit Suman works as a Product Manager for the Developer Tools team. He has experience in product management, software engineering and architecture in fields such as large-scale distributed computing and developer productivity. Currently making software to enhance the overall developer experience for hybrid-cloud infrastructure, Suman is an advocate of open source principles and building strong communities.