{"id":229009,"date":"2022-05-22T21:56:19","date_gmt":"2022-05-23T04:56:19","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/java\/?p=229009"},"modified":"2022-05-22T21:56:19","modified_gmt":"2022-05-23T04:56:19","slug":"java-on-visual-studio-code-update-may-2022","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/java\/java-on-visual-studio-code-update-may-2022\/","title":{"rendered":"Java on Visual Studio Code Update \u2013 May 2022"},"content":{"rendered":"<p>Hi everyone, welcome to the May update of Visual Studio Code Java. In this month&#8217;s update, we are going to share exciting improvements to our user experience regarding signature help and code completion as well as new Gradle features. Let&#8217;s get started!<\/p>\n<h4><strong>Signature Help Improvement<\/strong><\/h4>\n<p>Signature Help displays the signature of a method in a tooltip when a user types the parameter list start character (typically an opening parenthesis). In our latest release, we have made some major improvements to this feature:<\/p>\n<ul>\n<li>We added the capability so that the signature help can be triggered automatically<\/li>\n<li>We also added two settings to control <strong>1)<\/strong> whether the signature help needs to triggered automatically <strong>2)<\/strong> whether the detailed method description needs to show automatically (this means <strong>both<\/strong> the signature and detailed documentation of the method will be displayed)<\/li>\n<\/ul>\n<p>Here is a demonstration of this feature<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/05\/signaturehlp_Trim.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-229035\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/05\/signaturehlp_Trim.gif\" alt=\"Signature Help\" width=\"1354\" height=\"690\" \/><\/a><\/p>\n<p>The settings to control how you would like to customize the signature help behavior can be found in the following screenshot:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/05\/signaturehelp.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-229029\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/05\/signaturehelp.png\" alt=\"Signature Help Setting\" width=\"840\" height=\"331\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/05\/signaturehelp.png 840w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/05\/signaturehelp-300x118.png 300w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/05\/signaturehelp-768x303.png 768w\" sizes=\"(max-width: 840px) 100vw, 840px\" \/><\/a><\/p>\n<p>If you are interested, you can also see a more detailed list of how you can utilize these improvements in the <a href=\"https:\/\/github.com\/eclipse\/eclipse.jdt.ls\/pull\/2039\">original PR<\/a> here<\/p>\n<h4><strong>Control Insert \/ Replace Mode for Code Completion<\/strong><\/h4>\n<p>In Visual Studio Code, when you accept a code completion suggestion, you can either overwrite or insert. This behavior can be changed in the &#8220;Editor &gt; Suggest: Insert Mode&#8221; setting. However, in the past, this feature might not work for Java code as it requires LSP to adopt it. In our latest release, we have made some changes so now it fully works with our Java extensions. In addition, you can use <strong>Shift<\/strong> key to switch between two modes on the fly! Here is a quick demo:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/05\/insertreplace.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-229038\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/05\/insertreplace.gif\" alt=\"Insert replace mode\" width=\"1376\" height=\"858\" \/><\/a><\/p>\n<p>The setting to set this preference can be found here:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/05\/insertreplace.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-229028\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/05\/insertreplace.png\" alt=\"Insert replace code completion\" width=\"877\" height=\"368\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/05\/insertreplace.png 877w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/05\/insertreplace-300x126.png 300w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/05\/insertreplace-768x322.png 768w\" sizes=\"(max-width: 877px) 100vw, 877px\" \/><\/a><\/p>\n<p>We hope these user experience improvements can really help to speed up your coding productivity!<\/p>\n<h4><strong>Gradle Improvements<\/strong><\/h4>\n<p>As we shared in our <a href=\"https:\/\/devblogs.microsoft.com\/java\/java-on-visual-studio-code-update-january-2022\/\">roadmap<\/a> previously, build tools is one of our major focuses. We are glad to share that in this area we are working very closely with <a href=\"https:\/\/gradle.com\/\">Gradle Enterprise<\/a> to improve our <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vscjava.vscode-gradle\">Gradle for Java<\/a> extension.<\/p>\n<p>In May, we have a few things to highlight:<\/p>\n<h5><strong>Pin Favorite Task<\/strong><\/h5>\n<p>When working with Gradle projects, it is quite common for a developer to repeatedly run some <a href=\"https:\/\/docs.gradle.org\/current\/dsl\/org.gradle.api.Task.html\">tasks<\/a>. To save developers time, we have now provided a feature that allows you to &#8220;pin&#8221; a task at the top of the project view so that it&#8217;s easy to find the task and run it again. You can even pass it with an argument. Here is a demo of this feature.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/05\/pintask.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-229053\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/05\/pintask.gif\" alt=\"Pin task\" width=\"1418\" height=\"1080\" \/><\/a><\/p>\n<h5><b>Bug fixes &#8211; Support Multi-level Projects and Chinese Encoding Issue<\/b><\/h5>\n<p>An <a href=\"https:\/\/github.com\/microsoft\/vscode-gradle\/issues\/1194\">issue<\/a> was reported from the community that when our extension searches for a task in a multi-level project, it will duplicate the task indefinitely. This is because of the incorrect usage of a Gradle API call. We have <a href=\"https:\/\/github.com\/microsoft\/vscode-gradle\/pull\/1224\">fixed<\/a> this issue in our latest release.<\/p>\n<p>Another <a href=\"https:\/\/github.com\/microsoft\/vscode-gradle\/issues\/1208\">issue<\/a> that would cause garbled Chinese characters was also fixed. Both issues were reported from the GitHub, and we thank the community for finding them and providing the sample projects with repro steps. Please continue sharing feedback with us.<\/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 May update of Visual Studio Code Java. In this month&#8217;s update, we are going to share exciting improvements to our user experience regarding signature help and code completion as well as new Gradle features. Let&#8217;s get started! Signature Help Improvement Signature Help displays the signature of a method in a [&hellip;]<\/p>\n","protected":false},"author":31999,"featured_media":229051,"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-229009","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 May update of Visual Studio Code Java. In this month&#8217;s update, we are going to share exciting improvements to our user experience regarding signature help and code completion as well as new Gradle features. Let&#8217;s get started! Signature Help Improvement Signature Help displays the signature of a method in a [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/posts\/229009","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=229009"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/posts\/229009\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/media\/229051"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/media?parent=229009"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/categories?post=229009"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/tags?post=229009"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}