{"id":227290,"date":"2020-01-06T11:00:10","date_gmt":"2020-01-06T19:00:10","guid":{"rendered":"http:\/\/devblogs.microsoft.com\/java\/?p=227290"},"modified":"2020-01-06T10:41:22","modified_gmt":"2020-01-06T18:41:22","slug":"java-on-visual-studio-code-update-january-2020","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/java\/java-on-visual-studio-code-update-january-2020\/","title":{"rendered":"Java on Visual Studio Code Update &#8211; January 2020"},"content":{"rendered":"<p>Happy New Year and welcome back to our first update of Java on Visual Studio Code in 2020.<\/p>\n<p>In this update, we&#8217;re introducing the long-waited &#8220;Call Hierarchy&#8221; support along with some Visual Studio Code UI updates which will benefit Java developers a lot. At the same time, new features are also introduced to Debugger and Test Runner. We will also share some other improvements including performance in this post. On to the update.<\/p>\n<h3>Call Hierarchy<\/h3>\n<p>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. Just right-click on the functions and click <code>Peek -&gt; Peek Call Hierarchy<\/code>.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-227298\" src=\"http:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/01\/callhierachy.jpg\" alt=\"\" width=\"1062\" height=\"404\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/01\/callhierachy.jpg 1062w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/01\/callhierachy-300x114.jpg 300w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/01\/callhierachy-1024x390.jpg 1024w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/01\/callhierachy-768x292.jpg 768w\" sizes=\"(max-width: 1062px) 100vw, 1062px\" \/><\/p>\n<h3>UI Improvements for Java<\/h3>\n<h5>Compact folders in Explorer<\/h5>\n<p>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.<\/p>\n<p>Setting\u00a0<code>explorer.compactFolders<\/code>\u00a0controls this behavior. By default, this setting is turned on.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-227296\" src=\"http:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/01\/explorer-compact.gif\" alt=\"\" width=\"1058\" height=\"718\" \/><\/p>\n<h5>Problems panel<\/h5>\n<p>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.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-227297\" src=\"http:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/01\/problemsview.png\" alt=\"\" width=\"2130\" height=\"370\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/01\/problemsview.png 2130w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/01\/problemsview-300x52.png 300w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/01\/problemsview-1024x178.png 1024w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/01\/problemsview-768x133.png 768w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/01\/problemsview-1536x267.png 1536w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/01\/problemsview-2048x356.png 2048w\" sizes=\"(max-width: 2130px) 100vw, 2130px\" \/><\/p>\n<p>In addition, you can also show current problem in status bar to see the summary of the selected problem in the active file without any additional keyboard or mouse gestures.<\/p>\n<h3>Debugger updates<\/h3>\n<p>Visual Studio Code Java now supports &#8216;Data Breakpoint&#8217;, so you can have the debugger break when a variable change its value. See the illustration below<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-227291\" src=\"http:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/01\/DataBreakpoint.png\" alt=\"\" width=\"1028\" height=\"771\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/01\/DataBreakpoint.png 1028w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/01\/DataBreakpoint-300x225.png 300w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/01\/DataBreakpoint-1024x768.png 1024w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/01\/DataBreakpoint-768x576.png 768w\" sizes=\"(max-width: 1028px) 100vw, 1028px\" \/><\/p>\n<p>We&#8217;ve also improved the run\/debug experience. You can see the new <code>Run<\/code>and <code>Debug<\/code> buttons in the debug panel, and you can also easily press <code>F5<\/code> to start a debugging session.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-227292\" src=\"http:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/01\/runJava.gif\" alt=\"\" width=\"1024\" height=\"768\" \/><\/p>\n<p>By default, the run configuration (aka. <code>launch.json<\/code>) won&#8217;t be persisted in your workspace. If you would like to save it, you can click the button &#8220;Create a <code>launch.json<\/code> file&#8221; in the Debug viewlet.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-227293\" src=\"http:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/01\/Generate_launch.json_.png\" alt=\"\" width=\"355\" height=\"312\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/01\/Generate_launch.json_.png 355w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/01\/Generate_launch.json_-300x264.png 300w\" sizes=\"(max-width: 355px) 100vw, 355px\" \/><\/p>\n<h3>Test Runner<\/h3>\n<p>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.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-227294\" src=\"http:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/01\/test-status.png\" alt=\"\" width=\"1024\" height=\"768\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/01\/test-status.png 1024w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/01\/test-status-300x225.png 300w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/01\/test-status-768x576.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<h3>More transparent build status<\/h3>\n<p>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&#8217;s happening behind the scene by simply clicking the language server status icon.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-227295\" src=\"http:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/01\/java.build_.status.gif\" alt=\"\" width=\"1024\" height=\"768\" \/><\/p>\n<h3>Performance improvements<\/h3>\n<p>To make coding in Visual Studio Code more enjoyable, We&#8217;ve made 2 enhancements to reduce the latency between typing and completion suggestions<\/p>\n<ol>\n<li>Remove duplicate calls of time consuming APIs.<\/li>\n<li>Limit completion results via <code>java.completion.maxResults<\/code> preference. By default, it&#8217;s limited to 50 completion results. You can change it to 0 if you&#8217;d like to see the full results list which might negatively impact the performance. We&#8217;re also working on more updates to further improve the experience, such as keybinding to load the full list and context aware search scope.<\/li>\n<\/ol>\n<h3>Other enhancements<\/h3>\n<p>The latest updates also brings a lot of other enhancements for Java experience in Visual Studio Code.<\/p>\n<ol>\n<li>Code actions\n<ol>\n<li>Support jump to definition on break\/continue<\/li>\n<li>Sort code action suggestions by relevance.<\/li>\n<li>quickfix to correct access to static elements.<\/li>\n<\/ol>\n<\/li>\n<li>Maven\n<ol>\n<li>Support to &#8220;Collapse All&#8221; in Maven explorer.<\/li>\n<li>Support to specify the project for command &#8220;Maven: Add a dependency&#8221;.<\/li>\n<\/ol>\n<\/li>\n<li>\u00a0Configurations\n<ol>\n<li>New <code>java.maven.updateSnapshots<\/code> preference to update snapshots\/releases for maven projects.<\/li>\n<li>New <code>java.project.referencedLibraries<\/code> preference to add jars to classpath. Other extensions can also use this API to update classpath.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>We&#8217;d also like to thank <a href=\"https:\/\/github.com\/omusil24\">Ondrej Musil<\/a> to contribute to extension API. In order for Visual Studio Code Java to support more features, it&#8217;s important for us to make sure the core language server is extensible.<\/p>\n<h3 id=\"signup\">Sign up<\/h3>\n<p>If you&#8217;d like to follow the latest of Java on VS Code, please provide your email with us using the form below. We will send out updates and tips every couple weeks and invite you to test our unreleased feature and provide feedback early on.<\/p>\n<div data-form-block-id=\"a98bf458-e066-e911-a96e-000d3a340154\"><\/div>\n<p><script src=\"https:\/\/mktdplp102cdn.azureedge.net\/public\/1.35.1026.0\/static\/js\/form-loader.js\"><\/script><\/p>\n<div id=\"dgCPdzqBMykwIL6XsCcP3tC9zZGvAAN-t3ma0GiZE0QU\"><\/div>\n<p><script language=\"javascript\" type=\"text\/javascript\">(function (id, f, t, ws, ms_tr_il_08, ms_tr_il_w_01) { var tr = function (cb) { var count = 0; var callback = function () { if (count == 0) { count++; if (w) { w.w(id, t, cb); } } }; var ts = document.createElement('script'); ts.src = ws; ts.type = 'text\/javascript'; ts.onload = callback; ts.onreadystatechange = function () { if (this.readyState == 'complete' || this.readyState == 'loaded') { callback(); } }; var head = document.getElementsByTagName('head')[0]; head.appendChild(ts); }; if (typeof ms_tr_il_08 === 'function') { if (ms_tr_il_w_01 === null) { tr(function() { ms_tr_il_08(id, f, t); }); } else { ms_tr_il_w_01.w(id, t, function(websiteVisitedParams) { ms_tr_il_08(id, f, t, websiteVisitedParams); }); } } else { tr(); }})('gCPdzqBMykwIL6XsCcP3tC9zZGvAAN-t3ma0GiZE0QU', 'https:\/\/5a3318f6fcc34e41bf99d46845944055.svc.dynamics.com\/f', 'https:\/\/5a3318f6fcc34e41bf99d46845944055.svc.dynamics.com\/t', 'https:\/\/5a3318f6fcc34e41bf99d46845944055.svc.dynamics.com\/t\/w', typeof ms_tr_il_08 === \"undefined\" ? null : ms_tr_il_08, typeof ms_tr_il_w_01 === \"undefined\" ? null : ms_tr_il_w_01);<\/script><\/p>\n<h3>Try it out<\/h3>\n<p>Please don\u2019t hesitate to give it a try! Your feedback and suggestions are very important to us and will help shape our product in future.<\/p>\n<ul>\n<li>Learn more about <a href=\"https:\/\/code.visualstudio.com\/docs\/languages\/java\" target=\"_blank\" rel=\"noopener noreferrer\">Java on Visual Studio Code<\/a>.<\/li>\n<li>Explore our step by step <a href=\"https:\/\/code.visualstudio.com\/docs\/java\/java-tutorial\" target=\"_blank\" rel=\"noopener noreferrer\">Java Tutorials on Visual Studio Code<\/a>.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>In this update for Java on VS Code, we&#8217;re introducing the long-waited &#8220;Call Hierarchy&#8221; support along with some Visual Studio Code UI updates which will benefit Java developers a lot. At the same time, new features are also introduced to Debugger and Test Runner. We will also share some other improvements including performance in this post.<\/p>\n","protected":false},"author":668,"featured_media":227302,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[25,248,24,12],"class_list":["post-227290","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","tag-debugging","tag-java","tag-java-test-runner","tag-visual-studio-code"],"acf":[],"blog_post_summary":"<p>In this update for Java on VS Code, we&#8217;re introducing the long-waited &#8220;Call Hierarchy&#8221; support along with some Visual Studio Code UI updates which will benefit Java developers a lot. At the same time, new features are also introduced to Debugger and Test Runner. We will also share some other improvements including performance in this post.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/posts\/227290","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/users\/668"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/comments?post=227290"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/posts\/227290\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/media\/227302"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/media?parent=227290"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/categories?post=227290"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/tags?post=227290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}