Visual Studio Code updates Java support
The September 2019 update to the Visual Studio Code editor, known as version 1.39, includes a number of new capabilities and improvements for Java developers. In addition, support for Java 13, the latest version of standard Java, has been added via the Language Support for Java extension from Red Hat.
New Java features in Visual Studio Code 1.39 include easier navigation of class implementations and overriding methods, inline refactoring, and new code actions and code snippets. The Language Support for Java extension provides Java linting, IntelliSense, refactoring, and Maven and Gradle support.
Specific Java highlights of Visual Studio Code 1.39 include:
- For code navigation, developers can keep track of class implementations and overriding methods by clicking the
Go to Super Implementationlink during a hover. Also for Java code actions, a couple of recent additions to Visual Studio Code include the ability to add a quick fix for non-accessible references, and the ability to change a package name in code or move the folder in a file system when the package name does not match the folder name. Developers also can automatically trigger an auto-import on paste. This can occur if developers paste blocks of code containing references to classes or static methods and fields not yet imported. This is enabled via the
java.actionOnPaste.organizeImportspreference in VS code preferences.
- For debugging, error-handling has been improved.
- For inline refactoring, developers can reverse the refactoring for local variable, constant, and method. Another refactoring allows developers to convert an anonymous class into a named inner class.
- An enhanced for-loop capability allows developers to simplify code by presenting for-loops that visit each element of an array/collection without explicitly expressing how to go from element to element.
- Server-side code snippets are supported, with more code snippets options presented in a context-aware way.
- The Maven extension now supports searching Maven Central to resolve an unknown type in code.
Where to download Visual Studio Code
IDG News Service