News
AI Explains Expressions in Update to Java on VS Code
Microsoft's dev team put AI to work to explain different kinds of expressions in the latest update to Java tooling for Visual Studio Code.
Microsoft stewards the development of Java tooling for its open-source-based code editor via extensions, including the Extension Pack for Java that bundles tools for language support, debugging, testing, IntelliCode and more.
That bundle, with more than 30 million installs, includes all the extensions listed in this screenshot:
For working with the Spring enterprise Java framework, the team handles the Spring Boot Extension Pack for the setup and development of new Spring applications.
The latest monthly update to VS Code Java tooling, announced today (Oct. 10), includes tweaks for Spring and Gradle, with the latter's functionality coming in the main extension pack.
Leading the list of Spring updates is the ability for GitHub Copilot AI (subscription required) to explain different kinds of expressions. These include:
- SpEL expressions: Spring Expression Language (SpEL) is a powerful expression language that supports querying and manipulating an object graph at runtime.
- Query statements used to retrieve data from a database.
- AOP Pointcut Expressions: Aspect-Oriented Programming (AOP) pointcut expressions define where advice (additional behavior) should be applied in code.
"SpEL expressions, query statements, and AOP pointcut expressions can sometimes be challenging to craft, but if you are using GitHub Copilot in your Visual Studio Code environment, the Spring Tools now show code lenses above these expressions that allow you to quickly let GitHub Copilot explain those statements for you," said Microsoft's Nick Zhu.
"The corresponding prompt is crafted in a way to provide a nice summary, followed by a more detailed explanation," said Zhu, who provided this animated GIF to show how it works:
Here are some other highlights of the announcement.
Spring Updates
- CRON Expressions: Syntax highlighting and validation for CRON expressions used in
@Scheduler
annotations.
- Inlay Hints: New inlay hints for query parameter names, showing the resolved method parameter names.
- Enhanced Spring Annotations: Improved support for various Spring annotations like
@ContextConfiguration
, @ConditionalOnResource
, @Named
, @Inject
, and @Resource
with features like auto-completion, go-to definition, and find references.
Gradle Updates
- Android Build Variant Support: The Gradle extension now supports build variants for Android projects, allowing developers to configure different application types from a single project.
- Hierarchical Tree Structure: Improved visualization of project structure in the Gradle Task Explorer, displaying it in a tree view.
About the Author
David Ramel is an editor and writer at Converge 360.