{"id":229119,"date":"2022-06-23T00:21:45","date_gmt":"2022-06-23T07:21:45","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/java\/?p=229119"},"modified":"2022-06-23T00:21:45","modified_gmt":"2022-06-23T07:21:45","slug":"java-on-visual-studio-code-update-june-2022","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/java\/java-on-visual-studio-code-update-june-2022\/","title":{"rendered":"Java on Visual Studio Code Update \u2013 June 2022"},"content":{"rendered":"<p>Hi everyone, welcome to the June update of Visual Studio Code Java. We have a feature-packed edition this time, including some major Spring visualization upgrade for Spring developers, user experience improvements as well as fundamental experience enhancements.<\/p>\n<h4>Spring Boot Visualization Upgrade<\/h4>\n<p>We have some good news for Spring developers! Microsoft has been working with VMWare to polish out the experience on the visualization for Spring Boot dashboard. In the past, the dashboard has been mainly used to launch apps. However, we realized that was far from enough. As a Spring developer, we often deal with beans and REST API mappings. As a result, we decided to bring these two concepts into the the Spring Boot dashboard extension and brought the extension into a separate view (as the screenshot shows below)<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/06\/springbootdashboard-1.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-229123\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/06\/springbootdashboard-1.png\" alt=\"Spring Boot dashboard smaller\" width=\"1261\" height=\"1032\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/06\/springbootdashboard-1.png 1261w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/06\/springbootdashboard-1-300x246.png 300w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/06\/springbootdashboard-1-1024x838.png 1024w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/06\/springbootdashboard-1-768x629.png 768w\" sizes=\"(max-width: 1261px) 100vw, 1261px\" \/><\/a><\/p>\n<p>With this view, developer can get a clear overview of all the beans and API mappings in the current Spring application. There are also a few important features that come with this view!<\/p>\n<h5>Navigation<\/h5>\n<p>Developers can click on any bean or API endpoint to directly navigate to the code (either the class of the bean, or the code where the API is defined). Here&#8217;s a demo.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/06\/navigation.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-229124\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/06\/navigation.gif\" alt=\"Navigation\" width=\"1336\" height=\"958\" \/><\/a><\/p>\n<h5>Filtering<\/h5>\n<p>As your codebase gets larger, you might want to only see some certain beans or API mappings. You can do this by using the built-in Visual Studio Code filtering system. Simply click on the top-level node (application in this case) and start typing, you will see the filtering happen. Here&#8217;s a quick demo.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/06\/filtering.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-229125\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/06\/filtering.gif\" alt=\"Filtering\" width=\"740\" height=\"450\" \/><\/a><\/p>\n<h5>Static vs Run-time Analysis<\/h5>\n<p>Another major feature we want to show is that we are able to analyze run-time only information now! Before running an actual application, the beans \/ API mapping views are just showing static information. However, that is definitely not enough as we often need to look for information when running our application. The way to start run-time analysis is to simply kick off your Spring application from the dashboard, when you see the beans and API mappings icons are green, that means all the information are now run-time only information. The beans that are displayed now will be run-time only.<\/p>\n<p>There is an inline button in the beans view that allows you to switch between two modes &#8211; One to see the beans that only defined by you, and another one to see all beans (including ones defined by Spring framework). In the editor view, URL address are generated on all the API endpoints (\/GET) on your code so you can directly visit them in your browser. We plan to extend them to all CRUD endpoints so you can integrate them with your REST clients.<\/p>\n<p>You can see a demo here:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/06\/liveinfo.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-229127\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/06\/liveinfo.gif\" alt=\"Live analysis\" width=\"1444\" height=\"994\" \/><\/a><\/p>\n<p>As shared in our roadmap earlier this year, Spring experience is one of our major investments for Java experience on Visual Studio Code. There will be many awesome features to come, so expect lots of Spring features!<\/p>\n<h4>Fundamental Experience Improvements<\/h4>\n<p>In addition to Spring features, we have made improvements to other areas. Fundamental experience also gets a lot of new features this time:<\/p>\n<h5>JUnit 5 Parameterized Test Enhancements<\/h5>\n<p>In Junit 5, one new feature is parameterized tests. This feature enables us to execute a single test method multiple times with different parameters. However, sometimes it might be difficult for developers to track all the invocations and visualize what has been executed. In our latest release, we have added a feature so that you can <strong>execute any single invocation in the parameterized tests and visualize all of them in our test explorer<\/strong>. Here is a demo to show this feature.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/06\/test-execution.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-229129\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/06\/test-execution.gif\" alt=\"test execution\" width=\"1921\" height=\"1079\" \/><\/a><\/p>\n<h5>More Relevant Code Actions<\/h5>\n<p>We have heard from our users that some of our code actions can be more visible and convenient. Therefore we have made the following adjustments<\/p>\n<ul>\n<li>Constructors, getters, setters can now all be accessed from the Quick Fix action (the light bulb icon from the left)<\/li>\n<li>Getters and setters can now be generated separately (not always together)<\/li>\n<li>Developer can select which field they want to generate if there are multiple fields<\/li>\n<\/ul>\n<p>These actions can either be triggered when your cursor is at a particular field or at the top class level .Watch the demo here:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/06\/codeaction-1.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-229136\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/06\/codeaction-1.gif\" alt=\"Code Action\" width=\"1172\" height=\"600\" \/><\/a><\/p>\n<h5>Java 17 in Remote Container<\/h5>\n<p>Since JDK 17 is now the new long-term support release (LTS), we have made it to be the default JDK in our Remote Container example. The details of this upgrade can be found at this <a href=\"https:\/\/github.com\/microsoft\/vscode-remote-try-java\/pull\/35#discussion_r869186808\">PR<\/a>. You can use this example by executing the command: <strong>&#8220;&gt;Remote-Containers: Try a Remote Container Sample&#8221; <\/strong>and then selecting &#8220;Java&#8221;. Note that you need to have Docker installed.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/06\/javaremote.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-229139\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/06\/javaremote.gif\" alt=\"Java remote container\" width=\"1298\" height=\"916\" \/><\/a><\/p>\n<h4>User Experience Improvements<\/h4>\n<p>There are also some minor user experience upgrades.<\/p>\n<h5>Terminal now display different names according to app names<\/h5>\n<p>Previously when user runs an application, it&#8217;s hard to tell which application the user is running. We have added the application name on the terminal to make it more user-friendly. See the screenshot for an example.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/06\/terminalappname.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-229143\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/06\/terminalappname.png\" alt=\"Terminal app name\" width=\"1410\" height=\"978\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/06\/terminalappname.png 1410w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/06\/terminalappname-300x208.png 300w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/06\/terminalappname-1024x710.png 1024w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/06\/terminalappname-768x533.png 768w\" sizes=\"(max-width: 1410px) 100vw, 1410px\" \/><\/a><\/p>\n<h5>Global Inlay Hints Settings in VS Code<\/h5>\n<p>In our <a href=\"https:\/\/devblogs.microsoft.com\/java\/java-on-visual-studio-code-update-april-2022\/\">April&#8217;s blog post<\/a>, we introduced our inlay hint support for Java code. Visual Studio Code has now introduced a global setting for customizing inlay hint behavior all across the editor. You can find this setting via <strong>editor.inlayHints.enabled.\u00a0<\/strong>One thing to mention is that it allows you to turn it on when you are holding a key combination. <strong>Note that this setting is a global setting and will override your Java-specific inlay hint setting<\/strong><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/06\/inlayhints.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-229144\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/06\/inlayhints.png\" alt=\"Inlay Hints\" width=\"820\" height=\"524\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/06\/inlayhints.png 820w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/06\/inlayhints-300x192.png 300w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/06\/inlayhints-768x491.png 768w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><\/p>\n<p><span style=\"font-size: 18pt;\"><strong><span class=\"x-hidden-focus\">Feedback and suggestions<\/span><\/strong><\/span><\/p>\n<p>As always, your feedback and suggestions are very important to us and will help shape our product in future. There are several ways to give us feedback<\/p>\n<ul>\n<li>Leave your comment on this blog post<\/li>\n<li><a href=\"https:\/\/github.com\/microsoft\/vscode-java-pack\/issues\/new\/choose\" target=\"_blank\" rel=\"noopener\">Open an issue<\/a>\u00a0on our GitHub Issues page<\/li>\n<li>Send an email to: vscjfeedback@microsoft.com<\/li>\n<\/ul>\n<h2 id=\"try-it-out\" class=\"x-hidden-focus\"><span style=\"font-size: 18pt;\"><strong><span class=\"x-hidden-focus\">Resources<\/span><\/strong><\/span><\/h2>\n<p>Here is a list of links that are helpful to learn Java on Visual Studio Code.<\/p>\n<ul>\n<li class=\"x-hidden-focus\">Learn more about\u00a0<a class=\"x-hidden-focus\" href=\"https:\/\/code.visualstudio.com\/docs\/languages\/java\" target=\"_blank\" rel=\"noopener noreferrer\">Java on Visual Studio Code<\/a>.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Hi everyone, welcome to the June update of Visual Studio Code Java. We have a feature-packed edition this time, including some major Spring visualization upgrade for Spring developers, user experience improvements as well as fundamental experience enhancements. Spring Boot Visualization Upgrade We have some good news for Spring developers! Microsoft has been working with VMWare [&hellip;]<\/p>\n","protected":false},"author":31999,"featured_media":229147,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[14,22,1,8,15],"tags":[],"class_list":["post-229119","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cloud","category-desktop","category-java","category-open-source","category-vscode"],"acf":[],"blog_post_summary":"<p>Hi everyone, welcome to the June update of Visual Studio Code Java. We have a feature-packed edition this time, including some major Spring visualization upgrade for Spring developers, user experience improvements as well as fundamental experience enhancements. Spring Boot Visualization Upgrade We have some good news for Spring developers! Microsoft has been working with VMWare [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/posts\/229119","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\/31999"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/comments?post=229119"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/posts\/229119\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/media\/229147"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/media?parent=229119"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/categories?post=229119"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/tags?post=229119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}