Welcome back to the May update of Java on Visual Studio Code.
Your satisfaction continuously motivates us delivering the best product for you. Therefore, whatever it is a new feature or an enhancement, we hope you like it. In this update, we will show enhancements on Java side that make the product more friendly and also answer a frequently asked question. On to the update.
As Java evolves, developers need deal with language level. Today, VS Code applies language level for your project based on project setting. As an enhancement, now VS Code’s status bar displays the language level directly, so no need open your project file to look for it anymore. When you click the language level on status bar, it will take you to “java.configuration.runtimes” setting, where you can configure your JDK settings. To get the benefit of this enhancement, you need the latest version of Language Support for Java extension and set active editor tab to a “.java” file.
Renaming a folder in the explorer view now triggers package refactoring. At the 1st time, you’ll be prompted to select either always automatically apply or always preview before apply:
The behavior is controlled by “java.refactor.renameFromFileExplorer” in your preference setting with below options:
Debugger extension now supports Attach by Process ID. To work with this new capability, you need the latest version of debugger extension, and add a debugger configuration with “java: Attach to Process” option. When run debugger, you will be promoted to pick a debugging process to attach.
Many users have asked us how to generate getters & setters in bulk. Actually, you can easily find the option of bulk generation under “Source Action” by right-clicking your .Java file.
Please don’t hesitate to give it a try! Your feedback and suggestions are very important to us and will help shape our product in future.
#java #open source #visual studio code #debugging #refactoring #testing