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

.NET Insight

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.

Upcoming Events