Java on Visual Studio Code July Update
Welcome to the July update of Java on Visual Studio Code!
In this update, we’d like to share a couple new refactoring features, semantic selection as well as some other enhancements we delivered during last few weeks.
extract to variable/constant/method
extract to variable/constant/method refactoring, more often than not, we would like to assign the result with a meaningful name. With this feature, you won’t need to perform a separate
rename action anymore, all are streamlined in the single refactoring step.
Convert a local variable to a field.
Extract to field is also a very popular refactor. When selecting an expression, you can now use
extract to field.
When selecting a variable declaration, it will
convert the variable to field.
Support for semantic selection
Smart Selection (a.k.a. Semantic Selection) is the new feature added by VS Code and now it understands Java code as well. With that, you are able to expand or shrink the selection range corresponding to the semantic info of the caret position in your code.
- To expand the selection, use `Shift + Alt + →` on Windows, and `Ctrl + Shift + Command + →` on Mac
- To shrink the selection, use `Shift + Alt + ←` on Windows and `Ctrl + Shift + Command + ←` on Mac
- Maven projects use the latest Execution Environment when
source/targetis not yet supported.
- For users who don’t have Maven installed locally,
mvncan not be found to create a Maven project from archetypes. Maven extension now embeds a global maven wrapper in the extension, which serves as a fallback if no
- Support to select archetype version during Maven project creation.
- Refresh explorer when config
- Added additional Gradle preferences.
java.import.gradle.arguments: arguments to pass to Gradle
java.import.gradle.jvmArguments: JVM arguments to pass to Gradle
java.import.gradle.home: setting for
- Support loading CheckStyle Configuration via Http URL.
If you’d like to follow the latest of Java on VS Code, please provide your email with us using the form below. We will send out updates and tips every couple weeks and invite you to test our unreleased feature and provide feedback early on.
Try it out
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.