{"id":229229,"date":"2022-07-17T02:53:10","date_gmt":"2022-07-17T09:53:10","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/java\/?p=229229"},"modified":"2022-07-17T02:53:10","modified_gmt":"2022-07-17T09:53:10","slug":"java-on-visual-studio-code-update-july-2022","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/java\/java-on-visual-studio-code-update-july-2022\/","title":{"rendered":"Java on Visual Studio Code Update \u2013 July 2022"},"content":{"rendered":"<p>Hi everyone, welcome to the July update of Visual Studio Code Java. We have brought exciting updates on Lombok support as well as a few other fundamental user experience improvements. Let&#8217;s get started!<\/p>\n<h4><strong>Lombok Support<\/strong><\/h4>\n<p>Lombok is a popular Java library that makes your coding life easier, and we have been consistently hearing from developers that our extensions don&#8217;t work well when they have Lombok dependency in their projects. Starting from a few months ago, we started investigating this and now we have <strong>fully enabled built-in support for Lombok<\/strong> within our extensions. You shouldn&#8217;t experience any weird issues with Lombok anymore.<\/p>\n<p>We are also aware of the fact that some developers already install the community-developed <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vscjava.vscode-lombok\">Lombok extension<\/a>, the original author <a href=\"https:\/\/github.com\/GabrielBB\">@GabrielBB<\/a> is moving on from the project, so Microsoft will maintain the extension from now on. We want to thank <a href=\"https:\/\/github.com\/GabrielBB\">@GabrielBB<\/a> who started it all and provided the original support for Lombok. We will add new features into this extension if necessary.<\/p>\n<p>Let&#8217;s talk about the built-in support we have added for Lombok.<\/p>\n<h5><span style=\"font-size: 14pt;\">Enable Lombok support and user notification<\/span><\/h5>\n<p>When a project is opened for the first time, and if our extension detects that there is a Lombok dependency. We will send a notification to remind the developer if Lombok support needs to be enabled. After reloading Visual Studio Code, Lombok support becomes available. Here is a short demo.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/07\/lombok01.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-229236\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/07\/lombok01.gif\" alt=\"Enable Lombok Support\" width=\"1342\" height=\"889\" \/><\/a><\/p>\n<h5><span style=\"font-size: 14pt;\">Manage Lombok Version in the Language Status Bar<\/span><\/h5>\n<p>After enabling the Lombok support, the developer can see the current Lombok version and status in the language status bar. If the developer click on the item, it will take the developer to where the Lombok version is configured, this will easily allow the developer the change Lombok version.<\/p>\n<p>After changing the Lombok version, there will be another notification require the developer to reload Visual Studio Code again. Here&#8217;s another demo to show this feature.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/07\/lombok02.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-229237\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/07\/lombok02.gif\" alt=\"Change Lombok Version\" width=\"1342\" height=\"889\" \/><\/a><\/p>\n<h5><span style=\"font-size: 14pt;\">Lombok Support Setting<\/span><\/h5>\n<p>If the developer does not want the built-in Lombok support, we have added a setting where it can be toggled on\/off. Simply go to the settings and search for &#8220;lombok&#8221;. Here is a screeshot.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/07\/lombok.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-229238\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/07\/lombok.png\" alt=\"Lombok setting screenshot\" width=\"1357\" height=\"548\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/07\/lombok.png 1357w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/07\/lombok-300x121.png 300w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/07\/lombok-1024x414.png 1024w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/07\/lombok-768x310.png 768w\" sizes=\"(max-width: 1357px) 100vw, 1357px\" \/><\/a><\/p>\n<h4><strong>User Experience Improvements<\/strong><\/h4>\n<p>Apart from Lombok, there are several user experience improvements that will make your coding life easier.<\/p>\n<h5><strong><span style=\"font-size: 14pt;\">Drag and Drop Support<\/span><\/strong><\/h5>\n<p>We have now enabled &#8220;Drag and Drop&#8221; in our Java Project Explorer view, so you can use it in your convenience. Here&#8217;s a couple scenarios of how you can use it:<\/p>\n<ul>\n<li>Move a class &#8211; Drag a class from one package to another package<\/li>\n<li>Move a package &#8211; Drag a package into another package<\/li>\n<li>Add a dependency &#8211; Drag a JAR file from operating system directly into a Java project that does not use build tools into &#8220;Referenced Libraries&#8221;<\/li>\n<\/ul>\n<p>Let &#8216;s see a quick demo of the first scenario<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/07\/draganddrop.gif\"><img decoding=\"async\" class=\"size-full wp-image-229244\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/07\/draganddrop.gif\" alt=\"Drag and drop\" width=\"1394\" height=\"918\" \/><\/a><\/p>\n<h5><strong><span style=\"font-size: 14pt;\">Inlay Hints Exclusion List<\/span><\/strong><\/h5>\n<p>In <a href=\"https:\/\/devblogs.microsoft.com\/java\/java-on-visual-studio-code-update-april-2022\/\">April&#8217;s Blog<\/a>, we first introduced our Inlay Hints for parameter names. We heard from developers that they liked the feature overall but in some cases, they might not want this feature to appear. Therefore, we have added a setting so that you can disable inlay hints under some circumstances. You can find this setting by typing &#8220;inlay exclusion&#8221; and clicking it under Java. Here is a screenshot.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/07\/inlayexclusion.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-229247\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/07\/inlayexclusion.png\" alt=\"Inlay exclusion\" width=\"1105\" height=\"568\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/07\/inlayexclusion.png 1105w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/07\/inlayexclusion-300x154.png 300w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/07\/inlayexclusion-1024x526.png 1024w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/07\/inlayexclusion-768x395.png 768w\" sizes=\"(max-width: 1105px) 100vw, 1105px\" \/><\/a><\/p>\n<h5><span style=\"font-size: 14pt;\"><strong>Debugging &#8211; Support function breakpoint<\/strong><\/span><\/h5>\n<p>This <a href=\"https:\/\/github.com\/microsoft\/vscode-java-debug\/issues\/258\">feature request<\/a> was originally raised in the community and addressed in the last release! Starting from version 0.24 of <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vscjava.vscode-java-pack\">Extension Pack for Java.<\/a>\u00a0You can set a function breakpoint in Visual Studio Code by clicking the &#8220;<strong>+<\/strong>&#8221; button in the Breakpoints view and entering a fully qualified method name from a Java class. When in debugging mode, execution is paused at your specified function name and the debugger displays information about the execution context. This even works when functions have the same name (overloaded functions). Here is a quick demo.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/07\/functionbreakpoint.gif\"><img decoding=\"async\" class=\"size-full wp-image-229254\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/07\/functionbreakpoint.gif\" alt=\"Function breakpoint\" width=\"1578\" height=\"996\" \/><\/a><\/p>\n<h5><span style=\"font-size: 14pt;\"><strong>More Code Actions<\/strong><\/span><\/h5>\n<p>Last but not least, we have been adding more code actions to the Quick Fix prompt in the past few months and trying to make it smarter based on your code, so please give them a try.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/07\/codeactions.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-229261\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/07\/codeactions.png\" alt=\"Code Actions\" width=\"975\" height=\"637\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/07\/codeactions.png 975w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/07\/codeactions-300x196.png 300w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/07\/codeactions-768x502.png 768w\" sizes=\"(max-width: 975px) 100vw, 975px\" \/><\/a><\/p>\n<h4><strong>Continued Spring Improvements &#8211; Bean Dependency View<\/strong><\/h4>\n<p>In <a href=\"https:\/\/devblogs.microsoft.com\/java\/java-on-visual-studio-code-update-june-2022\/\">last month&#8217;s blog<\/a>, we unveiled our brand new Spring Boot dashboard, but we are not done with our Spring improvements. We are adding new features each month. This time we are bringing you the bean dependency view. As a Spring developer, bean dependency is something that we deal with very often and sometimes we might want to visualize that. We added this feature to Spring Boot dashboard. It will become available when you launch the application from the Spring Boot dashboard, and click the inline button on the right. From there, you can go two directions. You can either see what this bean is injected into, or see what this bean is depending on. Let&#8217;s see a quick demo.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/07\/beandependency.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-229259\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/07\/beandependency.gif\" alt=\"Bean Dependency\" width=\"1440\" height=\"964\" \/><\/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 July update of Visual Studio Code Java. We have brought exciting updates on Lombok support as well as a few other fundamental user experience improvements. Let&#8217;s get started! Lombok Support Lombok is a popular Java library that makes your coding life easier, and we have been consistently hearing from developers [&hellip;]<\/p>\n","protected":false},"author":31999,"featured_media":229264,"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-229229","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 July update of Visual Studio Code Java. We have brought exciting updates on Lombok support as well as a few other fundamental user experience improvements. Let&#8217;s get started! Lombok Support Lombok is a popular Java library that makes your coding life easier, and we have been consistently hearing from developers [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/posts\/229229","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=229229"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/posts\/229229\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/media\/229264"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/media?parent=229229"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/categories?post=229229"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/tags?post=229229"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}