days
-4
-5
hours
0
-6
minutes
0
-9
seconds
0
-4
search
Enhancements and the latest features

Java updates for Visual Studio Code adds Smart Selection API

Sarah Schlothauer
java
© Shutterstock /patpitchaya

The newest update for Java on Visual Studio Code is here. This update adds a few new Maven improvements, the Smart Selection API, and some new refactoring features. Never used Java on VS Code? Take a peek at some of the most used extensions for it and what Java frameworks and tools it supports.

As summer heats up, news from VS Code continues to roll in. Microsoft announced the July update for Java on Visual Studio Code on July 22, 2019. This update includes some new features that rolled out for Visual Studio Code in the past few weeks.

Do you use Java on VS Code? Java support on VS Code uses a variety of extensions that expand VS Code’s features and turn it into a lightweight Java development environment. With the use of these extensions, VS Code supports dev tools, including popular frameworks such as Maven and Spring Boot, debuggers, a linter, and more.

Supported features include code editing and navigation, running and debugging, unit testing, Azure Functions, IntelliSense, project management, and more.

java

Extensions for VS Code. Source.

July 2019 updates

This month adds new refactoring features, the Smart Selection API, and some improvements. Let’s take a look at the newest July features and enhancements:

  • New refactor feature: Trigger rename after extract to variable/constant/method. Users will no longer need to use a rename action, saving themselves a few steps.
  • Extract to field: New refactor added. Select and expression and extract to field from a menu. Selecting a variable declaration will convert the variable to field.
  • Smart Selection/Semantic Selection API support: The recently added VS Code feature now supports Java code. Expand the selection range of semantic info with Shift + Alt + → (on Windows devices) and shrink the range with Shift + Alt + ← .
  • Maven improvements: Several new improvements added, including the ability to support archetype versions during project creation, and Maven projects will now use the latest Execution Environment when the source/target does not yet support it.
  • Gradle preferences: New Gradle preferences, including arguments to pass to Gradle, JVM arguments to pass to Gradle, and setting for GRADLE_HOME.
  • Checkstzle support: The new update supports loading CheckStyle Configuration via HTTP URL.

SEE ALSO: Vugu: Experimental library for web UI in Go, targeting WebAssembly

Smart Selection example. Source.

Preparing the dev environment

Prerequisites for using Java on Visual Studio Code include the Java SE Development Kit (JDK) installed on your local development environment.

SEE ALSO: “No one thinks about what comes after the deployment”

Users will also need to configure their environment, by setting the JAVA_HOME environment variable.

Or, Windows users can download the Java Extension Pack, which includes popular, commonly-used extensions for Java development, including a test runner, support by Red Hat, and a Maven project explorer.

Author
Sarah Schlothauer

Sarah Schlothauer

All Posts by Sarah Schlothauer

Sarah Schlothauer is an assistant editor for JAXenter.com. She received her Bachelor's degree from Monmouth University and is currently enrolled at Goethe University in Frankfurt, Germany where she is working on her Masters. She lives in Frankfurt with her husband and cat.

Leave a Reply

Be the First to Comment!

avatar
400
  Subscribe  
Notify of