{"id":228079,"date":"2021-04-20T17:50:59","date_gmt":"2021-04-21T00:50:59","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/java\/?p=228079"},"modified":"2021-04-20T17:50:59","modified_gmt":"2021-04-21T00:50:59","slug":"java-on-visual-studio-code-update-march-2021","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/java\/java-on-visual-studio-code-update-march-2021\/","title":{"rendered":"Java on Visual Studio Code Update \u2013 March 2021"},"content":{"rendered":"<p>It\u2019s blogging time again. Welcome to VS Code update for Java. In the last couple of months, our engineers have been working on a few very important things. Now, it\u2019s time to uncover. Let\u2019s start.<\/p>\n<h3>Type hierarchy<\/h3>\n<p>VS Code has already supported call hierarchy for Java, so what about type hierarchy? Together with Red Hat, we are very happy to announce type hierarchy is publicly available from the latest release of <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=redhat.java\">Language Support for Java published by Red Hat<\/a>.<\/p>\n<p>The feature allows you to view type hierarchy in class, supertype, or subtype view.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2021\/04\/type-hierarchy.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-228083\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2021\/04\/type-hierarchy.gif\" alt=\"Image type hierarchy\" width=\"1648\" height=\"1544\" \/><\/a><\/p>\n<h3>Package refactoring when moving file<\/h3>\n<p>We know a lot of developers waiting for this feature, when a .java file is moved from one folder to another, VS Code can automatically update package declaration and importing statements. The latest release of <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=redhat.java\">Language Support for Java published by Red Hat<\/a> now supports this feature. In addition to automatic updating, the feature also allows you to review and undo package changes.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2021\/04\/moveRefactoring.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-228082\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2021\/04\/moveRefactoring.gif\" alt=\"Image moveRefactoring\" width=\"2048\" height=\"1536\" \/><\/a><\/p>\n<h3>Classpath configuration<\/h3>\n<p>Managing path for source code, output, runtime, and libraries is an important project management task, almost every Java developer will perform. For those using build tool like Maven or Gradle, the tool allows managing these paths through its configuration file. However, for those not using the build tool, especially like students, they need rely on IDE\/editor tool to manage. Responding to that need, we released classpath configuration feature.<\/p>\n<h4>Launch<\/h4>\n<p>You can launch the classpath configuration from \u201c<strong>JAVA PROJECTS<\/strong>\u201d explorer or by\u00a0clicking <strong>Ctrl+Shift+P<\/strong>\u00a0to open command palette and then typing \u201c<strong>configure classpath<\/strong>\u201d on the palette.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2021\/04\/classpath-configuration-launch.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-228080\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2021\/04\/classpath-configuration-launch.png\" alt=\"Image classpath configuration launch\" width=\"1096\" height=\"401\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2021\/04\/classpath-configuration-launch.png 1096w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2021\/04\/classpath-configuration-launch-300x110.png 300w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2021\/04\/classpath-configuration-launch-1024x375.png 1024w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2021\/04\/classpath-configuration-launch-768x281.png 768w\" sizes=\"(max-width: 1096px) 100vw, 1096px\" \/><\/a><\/p>\n<p>This feature is released as part of <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vscjava.vscode-java-pack\">Java Extension Pack<\/a>. Please, make sure you have installed the latest version of the pack.<\/p>\n<h3>Maven lifecycle support<\/h3>\n<p>In the latest <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vscjava.vscode-maven\">Maven for Java extension<\/a> release, Maven lifecycle is supported. Now, you can directly execute common lifecycle phases from Maven explorer view by clicking the run icon next to a phase.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2021\/04\/Maven-lifecycle.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-228081\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2021\/04\/Maven-lifecycle.png\" alt=\"Image Maven lifecycle\" width=\"695\" height=\"606\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2021\/04\/Maven-lifecycle.png 695w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2021\/04\/Maven-lifecycle-300x262.png 300w\" sizes=\"(max-width: 695px) 100vw, 695px\" \/><\/a><\/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>It\u2019s blogging time again. Welcome to VS Code update for Java. In the last couple of months, our engineers have been working on a few very important things. Now, it\u2019s time to uncover. Let\u2019s start.<\/p>\n","protected":false},"author":26010,"featured_media":228086,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,8,15],"tags":[780,248,19,27,779,12],"class_list":["post-228079","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","category-open-source","category-vscode","tag-classpath","tag-java","tag-maven","tag-refactoring","tag-type-hierarchy","tag-visual-studio-code"],"acf":[],"blog_post_summary":"<p>It\u2019s blogging time again. Welcome to VS Code update for Java. In the last couple of months, our engineers have been working on a few very important things. Now, it\u2019s time to uncover. Let\u2019s start.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/posts\/228079","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\/26010"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/comments?post=228079"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/posts\/228079\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/media\/228086"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/media?parent=228079"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/categories?post=228079"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/tags?post=228079"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}