News

VS Code Gets Java Code Navigation Update, New Code Actions, More

The monthly update to Java on Visual Studio Code sees updated code navigation, new code actions, Java 13 support and more.

The Java functionality in the VS code editor comes from extensions in the tool's marketplace that provide code completion, refactoring, linting, formatting, code snippets, debugging and unit test support, and integrations with tools and frameworks including Maven, Tomcat, Jetty, and Spring Boot.

Here's a look at what's new in the October update, as detailed in an Oct. 18 blog post:

  • Code Navigation -- Go to super implementation -- "You can now keep track of class implementations and overriding methods by clicking the Go to Super Implementation link when hover."
  • Code Actions:
    • -- Create non existing package -- "Now when your package name doesn't match the folder name, you have the options to either change the package name in your code, or move the folder in file system (even when the destination folder doesn't exist yet)."
    • -- Add quick fix for non accessible references -- "This quick fix helps you resolve non accessible reference."
    • -- Automatically trigger auto-import on paste -- "If you paste blocks of code that contain references to classes or static methods and fields that are not yet imported, VS Code now can automatically add missing imports."
  • Refactoring:
    • -- Inline refactoring -- "The Inline refactoring lets you reverse the refactoring for a local variable, method, and constant."
    • -- Convert for-loop to for-each loop -- "The enhanced for-loop is a popular feature. Its simple structure allows you to simplify code by presenting for-loops that visit each element of an array/collection without explicitly expressing how one goes from element to element."
    • -- Convert anonymous class to nested class -- "This refactoring allows you to convert an anonymous class into a named inner class."
    • -- Deprecation tags for symbols and completions -- "Java extension now shows source code that references deprecated types or members with a strike-through line."
  • Code Snippets: "Now VS Code Java supports server side code snippets, which means it will provide more code snippets options in a context aware way."
  • Java 13 support: "Java 13 is out and VS Code is ready for it. It supports Java 13 through latest Java Extension. For developers use Java 12 with preview features, you will need to upgrade to JDK 13 to keep working with them."
  • Debugger: -- Show Run/Debug when hover -- "In case you don't like the Run/Debug button on the Code Lens of your main method, but still want easy access to the functionality, you can now configure to disable the Code Lens but still accessible by hover."
  • Maven Support: -- Resolve unknown type -- "Maven extension now supports searching Maven Central to resolve unknown type in your code. You can achieve this easily by clicking the link in hover."
  • Checkstyle:
    • -- Enhanced setting configuration command -- "Checkstyle: Set the Checkstyle Configuration command will now detect potential Checkstyle configuration files and list them. You can also provide a configuration file by directly writing a URL in the input box now."
    • -- Setting checkstyle version support -- "A new command Checkstyle: Set the Checkstyle Version is added to the extension."

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus

Featured

  • Visual Studio Code Dev Team Cleans Up

    The Visual Studio Code development team focused on some housekeeping in the October update, closing more than 4,000 issues on GitHub, where the cross-platform, open-source editor lives.

  • ML.NET Model Builder Update Boosts Image Classification

    Microsoft announced an update to the Model Builder component of its ML.NET machine learning framework, boosting image classification and adding "try your model" functionality for predictions with sample input.

  • How to Do Naive Bayes with Numeric Data Using C#

    Dr. James McCaffrey of Microsoft Research uses a full code sample and screenshots to demonstrate how to create a naive Bayes classification system when the predictor values are numeric, using the C# language without any special code libraries.

  • Vortex

    Open Source 'Infrastructure-as-Code' SDK Adds .NET Core Support for Working with Azure

    Pulumi, known for its "Infrastructure-as-Code" cloud development tooling, has added support for .NET Core, letting .NET-centric developers use C#, F# and VB.NET to create, deploy, and manage Azure infrastructure.

  • .NET Framework Not Forgotten: Repair Tool Updated

    Even though Microsoft's development focus has shifted to the open-source, cross-platform .NET Core initiative -- with the aging, traditional, Windows-only .NET Framework relegated primarily to fixes and maintenance such as quality and reliability improvements -- the latter is still getting some other attention, as exemplified in a repair tool update.

.NET Insight

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.

Upcoming Events