New VS Code Java Update: Suffix Completion, Organize Imports, and Step‑Into Target
The November VS Code Java extension release introduces suffix completion snippets, enhanced organize import actions, a new Step Into Target debugging feature, and visual improvements for Spring components, offering Java developers streamlined coding, faster navigation, and richer Spring Boot integration.
Visual Studio Code team released the November Java update, adding new code editing features such as suffix completion and improved organize import, as well as a debugger enhancement called “Step Into Target”. The update also brings visual enhancements for Spring components.
Suffix Completion
Suffix completion lets you insert predefined code snippets immediately after typing an expression, a feature popular in JetBrains IDEs now available in VS Code.
Supported suffix shortcuts include: cast – ((SomeType) expr) – converts an expression to a new type. else – if (!expr) – creates a negated if statement. for – for (T item : expr) – creates a for‑each loop. fori – for (int i = 0; i < expr.length; i++) – creates a classic indexed for loop. forr – for (int i = expr.length‑1; i >= 0; i--) – iterates an array in reverse order. if – if (expr) – creates an if statement. nnull – if (expr != null) – checks that an expression is not null. null – if (expr == null) – checks that an expression is null. sysout – System.out.println(expr) – prints a value to the console. throw – throw expr – throws the given exception. var – T name = expr – declares a new variable. while – while (expr) {} – creates a while loop.
Organize / Clean Imports Optimization
QuickFix now offers “Remove all unused imports”.
QuickFix can also “Add all missing imports”.
The Source Action menu provides “Add all missing imports” as an alternative.
Debugging New Feature – Step Into Target
When debugging code with many nested calls, the new “Step Into Target” UI lets you jump directly to a chosen function, simplifying navigation through complex call stacks.
Spring Component Visuals
Visual cues have been added next to Spring beans and endpoint mappings, showing green icons that reveal details on hover and provide a link to open the component in the Spring Boot Dashboard.
To use these features, install the Extension Pack for Java from the VS Code Marketplace:
https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack
Spring developers can also install the Spring Boot plugin pack for dedicated Spring Boot experience:
https://marketplace.visualstudio.com/items?itemName=Pivotal.vscode-boot-dev-pack
More information: https://devblogs.microsoft.com/java-ch/java-on-visual-studio-code-2022-11/
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Programmer DD
A tinkering programmer and author of "Spring Cloud Microservices in Action"
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
