{"id":222659,"date":"2018-12-14T08:30:58","date_gmt":"2018-12-14T16:30:58","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/visualstudio\/?p=20505"},"modified":"2019-10-29T12:55:04","modified_gmt":"2019-10-29T19:55:04","slug":"visual-studio-code-updates-for-java-developers-rename-logpoints-testng-and-more","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/java\/visual-studio-code-updates-for-java-developers-rename-logpoints-testng-and-more\/","title":{"rendered":"Visual Studio Code Updates for Java Developers: Rename, Logpoints, TestNG and More"},"content":{"rendered":"<p>As we seek to continually improve the Visual Studio Code experience for Java developers, we\u2019d like to share couple new features we\u2019ve just released. Thanks for your great feedback over the year, we\u2019re heading into the holidays with great new features we hope you\u2019ll love. Here\u2019s to a great 2019!<\/p>\n<h2>Rename<\/h2>\n<p>With the new release of the <a href=\"https:\/\/github.com\/eclipse\/eclipse.jdt.ls\" target=\"_blank\" rel=\"noopener noreferrer\">Eclipse JDT Language Server<\/a>, we\u2019re removing the friction some developers experienced in ensuring renamed Java classes perpetuate into the underlying file in Visual Studio Code. With the update, when a symbol is renamed the corresponding source file on disk is automatically renamed, along with all the references.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/Rename.gif\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"alignnone wp-image-20555 size-full\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/Rename.gif\" alt=\"\" width=\"1024\" height=\"768\" \/><\/a><\/p>\n<h2>Debugger<\/h2>\n<p><a href=\"https:\/\/code.visualstudio.com\/blogs\/2018\/07\/12\/introducing-logpoints-and-auto-attach#_introducing-logpoints\" target=\"_blank\" rel=\"noopener noreferrer\">VS Code Logpoints<\/a> is now supported in the Java Debugger. Logpoints allow you to inspect the state and send output to debug console without changing the source code and explicitly adding logging statements. Unlike breakpoints, logpoints don\u2019t stop the execution flow of your application.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/Logpoints.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-20625\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/Logpoints.gif\" alt=\"\" width=\"1024\" height=\"768\" \/><\/a><\/p>\n<p>To make debugging even easier, you can now skip editing the \u201c<em>launch.json\u201d<\/em> file by either clicking the CodeLens on top of the \u201c<em>main\u201d<\/em> function or using the F5 shortcut to debug the current file in Visual Studio Code.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/CodeLens.gif\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"alignnone wp-image-20525 \" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/CodeLens.gif\" alt=\"\" width=\"500\" height=\"171\" \/><\/a><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/F5CurrentFile.gif\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"alignnone wp-image-20605 size-full\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/F5CurrentFile.gif\" alt=\"\" width=\"1024\" height=\"768\" \/><\/a><\/p>\n<h2>TestNG support<\/h2>\n<p>TestNG support was added to the newest version of the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vscjava.vscode-java-test\" target=\"_blank\" rel=\"noopener noreferrer\">Java Test Runner<\/a>. With the new release, we\u2019ve also updated the UI\u2019s of the test explorer and the test report. See how you can work with TestNG in Visual Studio Code.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/TestNG.gif\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"alignnone wp-image-20565 size-full\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/TestNG.gif\" alt=\"\" width=\"1024\" height=\"768\" \/><\/a><\/p>\n<p>We\u2019ve also enhanced our JUnit 5 support with new annotations, such as @DisplayName and @ParameterizedTest.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/JUnit5DisplayName.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"alignnone wp-image-20575 size-full\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/JUnit5DisplayName.png\" alt=\"\" width=\"1024\" height=\"345\" \/><\/a><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/JUnit5ParameterizedTest.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"alignnone wp-image-20545\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/JUnit5ParameterizedTest.png\" alt=\"\" width=\"500\" height=\"206\" \/><\/a><\/p>\n<p>Another notable improvement in the Test Runner is that we\u2019re no longer loading all test cases during startup. Instead, the loading now only happens when necessary, e.g. when you expand a project to see the test classes in the Test viewlet. This should reduce the resource needed on your environment and enhance the overall performance of the tool.<\/p>\n<h2>Updated Java Language Pack<\/h2>\n<p>We\u2019ve included the recently released <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vscjava.vscode-java-dependency\" target=\"_blank\" rel=\"noopener noreferrer\">Java Dependency Viewer<\/a> to the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vscjava.vscode-java-pack\" target=\"_blank\" rel=\"noopener noreferrer\">Java Extension Pack<\/a> as more and more developers are asking for the package view, dependency management and project creation capability provided by this extension. The viewer also provides a hierarchy view of the package structure.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/DependencyViewer.gif\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"alignnone wp-image-20515 size-full\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/DependencyViewer.gif\" alt=\"\" width=\"1024\" height=\"768\" \/><\/a><\/p>\n<h2>Additional language support &#8211; Chinese<\/h2>\n<p>As the user base of Java developers using Visual Studio Code is expanding around the world, we decided to make our tool even easier to use for our users internationally by offering translated UI elements. Chinese localization is now available for <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vscjava.vscode-maven\" target=\"_blank\" rel=\"noopener noreferrer\">Maven<\/a> and <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vscjava.vscode-java-debug\" target=\"_blank\" rel=\"noopener noreferrer\">Debugger<\/a>, it will soon be available for other extensions as well. We\u2019d also like to welcome contributions from community for localization as well.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/DebugConfigurationCHN1.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"alignnone wp-image-20585 size-full\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/DebugConfigurationCHN1.png\" alt=\"\" width=\"1024\" height=\"770\" \/><\/a><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/DebugConfigurationCHN2.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"alignnone wp-image-20595 size-full\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/DebugConfigurationCHN2.png\" alt=\"\" width=\"1026\" height=\"771\" \/><\/a><\/p>\n<h2>IntelliCode and Live Share<\/h2>\n<p>During last week\u2019s <a href=\"https:\/\/www.microsoft.com\/en-us\/connectevent\" target=\"_blank\" rel=\"noopener noreferrer\">Microsoft Connect()<\/a> event, we shared updates on the popular <a href=\"https:\/\/visualstudio.microsoft.com\/services\/live-share\/\" target=\"_blank\" rel=\"noopener noreferrer\">Visual Studio Live Share<\/a> and <a href=\"https:\/\/visualstudio.microsoft.com\/services\/intellicode\/\" target=\"_blank\" rel=\"noopener noreferrer\">Visual Studio IntelliCode<\/a> features. The new IDE capabilities \u2013 all of which support Java \u2013 provide you with even better productivity with enhanced collaboration and coding experience that you can try now in Visual Studio Code.<\/p>\n<p>Just download the extensions for <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=MS-vsliveshare.vsliveshare-pack\" target=\"_blank\" rel=\"noopener noreferrer\">Live Share<\/a> and <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=VisualStudioExptTeam.vscodeintellicode\" target=\"_blank\" rel=\"noopener noreferrer\">IntelliCode<\/a> to experience those new features with your friends and co-workers. Happy coding and happy collaborating!<\/p>\n<h2>Attach missing sources<\/h2>\n<p>When you navigate to a class in some libraries without source code, you can now attach the missing source zip\/jar using the context menu \u201c<em>Attach Source\u201d<\/em>.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/AttachSource.gif\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"alignnone wp-image-20535 size-full\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/AttachSource.gif\" alt=\"\" width=\"1024\" height=\"768\" \/><\/a><\/p>\n<h2>We love your feedback<\/h2>\n<p>Your feedback and suggestions are especially important to us and will help shaping our products in future. Please help us by taking this <a href=\"https:\/\/www.research.net\/r\/vscodejava-blog?o=%5bo_value%5d&amp;m=%5bm_value%5d\" target=\"_blank\" rel=\"noopener noreferrer\">survey<\/a> to share your thoughts!<\/p>\n<h2>Try it out<\/h2>\n<p>Please don\u2019t hesitate to try Visual Studio Code for your Java development and let us know your thoughts! Visual Studio Code is a lightweight and performant code editor and our goal is to make it great for the entire Java community.<\/p>\n<ul>\n<li>Install the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vscjava.vscode-java-pack\" target=\"_blank\" rel=\"noopener noreferrer\">Java Extension Pack<\/a> which including <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=redhat.java\" target=\"_blank\" rel=\"noopener noreferrer\">Language Support for Java(TM) by Red Hat<\/a>, <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vscjava.vscode-java-debug\" target=\"_blank\" rel=\"noopener noreferrer\">Debugger for Java<\/a>, <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vscjava.vscode-maven\" target=\"_blank\" rel=\"noopener noreferrer\">Maven<\/a>, <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vscjava.vscode-java-test\" target=\"_blank\" rel=\"noopener noreferrer\">Java Test Runner<\/a> and <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vscjava.vscode-java-dependency\" target=\"_blank\" rel=\"noopener noreferrer\">Java Dependency Viewer<\/a>.<\/li>\n<li>Install other Java related extensions base on your needs, including\n<ul>\n<li>Checkout <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=adashen.vscode-tomcat\" target=\"_blank\" rel=\"noopener noreferrer\">Tomcat<\/a> and <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=SummerSun.vscode-jetty\" target=\"_blank\" rel=\"noopener noreferrer\">Jetty<\/a> if you\u2019re working with those technologies.<\/li>\n<li>In case you\u2019re working on Spring Boot, there\u2019re also great support provided by <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=Pivotal.vscode-boot-dev-pack\" target=\"_blank\" rel=\"noopener noreferrer\">Pivotal<\/a> and <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vscjava.vscode-spring-initializr\" target=\"_blank\" rel=\"noopener noreferrer\">Microsoft<\/a> available on VS Code including <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=Pivotal.vscode-spring-boot\" target=\"_blank\" rel=\"noopener noreferrer\">Spring Boot Tools<\/a>, <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vscjava.vscode-spring-initializr\" target=\"_blank\" rel=\"noopener noreferrer\">Spring Initializr<\/a> and <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vscjava.vscode-spring-boot-dashboard\" target=\"_blank\" rel=\"noopener noreferrer\">Spring Boot Dashboard<\/a>.<\/li>\n<li><a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=shengchen.vscode-checkstyle\" target=\"_blank\" rel=\"noopener noreferrer\">Checkstyle<\/a> could be handy when you need coherence code style especially cross multiple team members.<\/li>\n<\/ul>\n<\/li>\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 VS Code<\/a>.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>We&#8217;re proud to announce an update to the Java Extension Pack, including new Language Support for Java(TM) by Red Hat, Debugger for Java, Maven, Java Test Runner and Java Dependency Viewer.<\/p>\n","protected":false},"author":668,"featured_media":226936,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[22,15],"tags":[16,23,24,12],"class_list":["post-222659","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-desktop","category-vscode","tag-announcement","tag-eclipse-jdt-language-server","tag-java-test-runner","tag-visual-studio-code"],"acf":[],"blog_post_summary":"<p>We&#8217;re proud to announce an update to the Java Extension Pack, including new Language Support for Java(TM) by Red Hat, Debugger for Java, Maven, Java Test Runner and Java Dependency Viewer.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/posts\/222659","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=222659"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/posts\/222659\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/media\/226936"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/media?parent=222659"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/categories?post=222659"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/tags?post=222659"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}