News

What's New for Java Developers in Visual Studio Code

Microsoft touted the introduction of long-awaited "Call Hierarchy" support and some UI updates in the year's first update to Java functionality in the cross-platform, open-source Visual Studio Code editor.

In VS Code, Java tooling is provided via various extensions, which can be downloaded together with the Java Pack Installer that can be found on Microsoft's Java in Visual Studio Code page.

"A call hierarchy view shows all calls from or to a function and allows you to drill into callers of callers and call of calls," said Xiaokai He, senior program manager for Java on Visual Studio Code and Azure. "Just right-click on the functions and click Peek -> Peek Call Hierarchy."

Also highlighted were UI and debugger improvements and more, summarized thusly:

  • UI improvements:
    • Compact folders in Explorer: "In the File Explorer, we now render single child folders in a compact form. In such a form, single child folders will be compressed in a combined tree element. Useful for Java package structures, for example."
    • Problems panel: "More predefined filters were added to the Problems panel. In addition to filtering by regular expression, you can now filter problems by type (errors, warnings, and information) and also see problems scoped to the current active file."
  • Debugger: "Visual Studio Code Java now supports ‘Data Breakpoint', so you can have the debugger break when a variable change its value. We've also improved the run/debug experience. You can see the new Runand Debug buttons in the debug panel, and you can also easily press F5 to start a debugging session."
  • Test Runner: "If you have installed our Java Test Runner extension, you may notice that the new Test Explorer now shows the test status/results directly so you will go to the report only when more detailed information is needed."
  • More transparent build status: "As you code in Visual Studio Code, the language server is building your workspace to provide you the necessary language features. Now you can see the detailed build task status and understand what's happening behind the scene by simply clicking the language server status icon."
  • Performance improvements: "To make coding in Visual Studio Code more enjoyable, We've made 2 enhancements to reduce the latency between typing and completion suggestions:
    • Remove duplicate calls of time consuming APIs.
    • Limit completion results via java.completion.maxResults preference. "By default, it's limited to 50 completion results. You can change it to 0 if you'd like to see the full results list which might negatively impact the performance. We're also working on more updates to further improve the experience, such as keybinding to load the full list and context aware search scope."

More details on the above and other tweaks -- concerning code actions, Maven and configurations -- are available here.

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus

Featured

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube