{"id":225883,"date":"2019-07-22T10:00:47","date_gmt":"2019-07-22T17:00:47","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=225883"},"modified":"2019-11-14T15:05:41","modified_gmt":"2019-11-14T23:05:41","slug":"java-on-visual-studio-code-july-update","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/java\/java-on-visual-studio-code-july-update\/","title":{"rendered":"Java on Visual Studio Code July Update"},"content":{"rendered":"<p>Welcome to the July update of Java on Visual Studio Code!<\/p>\n<p>In this update, we\u2019d like to share a couple new refactoring features, semantic selection as well as some other enhancements we delivered during last few weeks.<\/p>\n<h3>Refactoring<\/h3>\n<h5>Trigger <code>rename<\/code> after <code>extract to variable\/constant\/method<\/code><\/h5>\n<p>After performing <code>extract to variable\/constant\/method<\/code> refactoring, more often than not, we would like to assign the result with a meaningful name. With this feature, you won&#8217;t need to perform a separate <code>rename<\/code> action anymore, all are streamlined in the single refactoring step.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-225887\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/07\/extract-rename.gif\" alt=\"\" width=\"1024\" height=\"768\" \/><\/p>\n<h5>Convert a local variable to a field.<\/h5>\n<p><code>Extract to field<\/code> is also a very popular refactor. When selecting an expression, you can now use <code>extract to field<\/code>.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-225888\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/07\/extract-field.gif\" alt=\"\" width=\"1024\" height=\"768\" \/><\/p>\n<p>When selecting a variable declaration, it will<code>convert the variable to field<\/code>.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-225889\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/07\/convert-field.gif\" alt=\"\" width=\"1024\" height=\"768\" \/><\/p>\n<h3>Support for semantic selection<\/h3>\n<p><a href=\"https:\/\/code.visualstudio.com\/updates\/v1_33#_smart-select-api\">Smart Selection<\/a> (a.k.a. Semantic Selection) is the new feature added by VS Code and now it understands Java code as well. With that, you are able to expand or shrink the selection range corresponding to the semantic info of the caret position in your code.<\/p>\n<ul>\n<li>To expand the selection, use `Shift + Alt + \u2192` \u00a0on Windows, and `Ctrl + Shift + Command + \u2192` on Mac<\/li>\n<li>To shrink the selection, use `Shift + Alt + \u2190` on Windows and `Ctrl + Shift + Command + \u2190` on Mac<\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-225896\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/07\/java.smart_.selection.gif\" alt=\"\" width=\"1024\" height=\"768\" \/><\/p>\n<h3>Other enhancements<\/h3>\n<h5>Maven<\/h5>\n<ul>\n<li>Maven projects use the latest Execution Environment when <code>source\/target<\/code> is not yet supported.<\/li>\n<li>For users who don&#8217;t have Maven installed locally, <code>mvn<\/code> can not be found to create a Maven project from archetypes. Maven extension now embeds a <em>global<\/em> maven wrapper in the extension, which serves as a fallback if no <code>mvn<\/code> or project-level <code>mvnw<\/code> found.<\/li>\n<li>Support to select archetype version during Maven project creation.<\/li>\n<li>Refresh explorer when config <code>maven.pomfile.globPattern<\/code> changes.<\/li>\n<\/ul>\n<h5>Gradle<\/h5>\n<ul>\n<li>Added additional Gradle preferences.\n<ul>\n<li><code>java.import.gradle.arguments<\/code>: arguments to pass to Gradle<\/li>\n<li><code>java.import.gradle.jvmArguments<\/code>: JVM arguments to pass to Gradle<\/li>\n<li><code>java.import.gradle.home<\/code>: setting for <code>GRADLE_HOME<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h5>Checkstyle<\/h5>\n<ul>\n<li>Support loading CheckStyle Configuration via Http URL.<\/li>\n<\/ul>\n<h3 id=\"signup\">Sign up<\/h3>\n<p>If you&#8217;d like to follow the latest of Java on VS Code, please provide your email with us using the form below. We will send out updates and tips every couple weeks and invite you to test our unreleased feature and provide feedback early on.<\/p>\n<div data-form-block-id=\"a98bf458-e066-e911-a96e-000d3a340154\"><\/div>\n<p><script src=\"https:\/\/mktdplp102cdn.azureedge.net\/public\/1.35.1026.0\/static\/js\/form-loader.js\"><\/script><\/p>\n<div id=\"dgCPdzqBMykwIL6XsCcP3tC9zZGvAAN-t3ma0GiZE0QU\"><\/div>\n<p><script language=\"javascript\" type=\"text\/javascript\">(function (id, f, t, ws, ms_tr_il_08, ms_tr_il_w_01) { var tr = function (cb) { var count = 0; var callback = function () { if (count == 0) { count++; if (w) { w.w(id, t, cb); } } }; var ts = document.createElement('script'); ts.src = ws; ts.type = 'text\/javascript'; ts.onload = callback; ts.onreadystatechange = function () { if (this.readyState == 'complete' || this.readyState == 'loaded') { callback(); } }; var head = document.getElementsByTagName('head')[0]; head.appendChild(ts); }; if (typeof ms_tr_il_08 === 'function') { if (ms_tr_il_w_01 === null) { tr(function() { ms_tr_il_08(id, f, t); }); } else { ms_tr_il_w_01.w(id, t, function(websiteVisitedParams) { ms_tr_il_08(id, f, t, websiteVisitedParams); }); } } else { tr(); }})('gCPdzqBMykwIL6XsCcP3tC9zZGvAAN-t3ma0GiZE0QU', 'https:\/\/5a3318f6fcc34e41bf99d46845944055.svc.dynamics.com\/f', 'https:\/\/5a3318f6fcc34e41bf99d46845944055.svc.dynamics.com\/t', 'https:\/\/5a3318f6fcc34e41bf99d46845944055.svc.dynamics.com\/t\/w', typeof ms_tr_il_08 === \"undefined\" ? null : ms_tr_il_08, typeof ms_tr_il_w_01 === \"undefined\" ? null : ms_tr_il_w_01);<\/script><\/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>Welcome to the July update of Java on Visual Studio Code! In this update, we\u2019d like to share a couple new refactoring features, semantic selection as well as some other enhancements we delivered during last few weeks. Refactoring Trigger rename after extract to variable\/constant\/method After performing extract to variable\/constant\/method refactoring, more often than not, we [&hellip;]<\/p>\n","protected":false},"author":668,"featured_media":226926,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[8,15],"tags":[29,19,27,12],"class_list":["post-225883","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-open-source","category-vscode","tag-gradle","tag-maven","tag-refactoring","tag-visual-studio-code"],"acf":[],"blog_post_summary":"<p>Welcome to the July update of Java on Visual Studio Code! In this update, we\u2019d like to share a couple new refactoring features, semantic selection as well as some other enhancements we delivered during last few weeks. Refactoring Trigger rename after extract to variable\/constant\/method After performing extract to variable\/constant\/method refactoring, more often than not, we [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/posts\/225883","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=225883"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/posts\/225883\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/media\/226926"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/media?parent=225883"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/categories?post=225883"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/tags?post=225883"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}