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 at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube