{"id":222641,"date":"2018-11-12T14:00:31","date_gmt":"2018-11-12T22:00:31","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/visualstudio\/?p=19505"},"modified":"2019-10-29T12:56:18","modified_gmt":"2019-10-29T19:56:18","slug":"ai-assisted-coding-comes-to-java-with-visual-studio-intellicode","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/java\/ai-assisted-coding-comes-to-java-with-visual-studio-intellicode\/","title":{"rendered":"AI-assisted coding comes to Java with Visual Studio IntelliCode"},"content":{"rendered":"<p><a href=\"https:\/\/visualstudio.microsoft.com\/services\/intellicode\/\" target=\"_blank\" rel=\"noopener noreferrer\">Visual Studio IntelliCode<\/a> is a set of AI-assisted capabilities that aims to improve developer productivity with features like AI-assisted IntelliSense and statement completion, code formatting, and style rule inference. During <a href=\"https:\/\/springoneplatform.io\/\" target=\"_blank\" rel=\"noopener noreferrer\">SpringOne 2018<\/a>, we announced that we will bring those productivity boosters to Java developers and now we\u2019re happy to introduce AI-assisted IntelliSense to Java in the <a href=\"https:\/\/go.microsoft.com\/fwlink\/?linkid=2006060\" target=\"_blank\" rel=\"noopener noreferrer\">IntelliCode Extension for Visual Studio Code<\/a>.<\/p>\n<p>IntelliCode saves you time by putting the most relevant suggestions at the top of your completion list. IntelliCode recommendations are based on thousands of open source projects on GitHub, each with over 100 stars, so it\u2019s trained on most popular usage patterns and practices. When combined with the context of your code, the completion list is tailored to promote those practices.<\/p>\n<p>Check out the animation below to see IntelliCode for Java in action.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-216805\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2018\/11\/intellicode_4_a.gif\" alt=\"IntelliCode for Java\" width=\"1024\" height=\"768\" \/><\/p>\n<p>You may have noticed that IntelliCode provides most relevant IntelliSense recommendations based on your current code context, especially within conditional blocks. IntelliCode works well with popular Java libraries and frameworks like Java SE platform and Spring framework. It will help you whether you are doing monolithic or modern microservices architecture.<\/p>\n<h2>Exploring and managing your Java project<\/h2>\n<p>You speak, we listen. Some of the most frequent feedback requests we received from developers on Visual Studio Code are the lack of a package view, dependency management and project creation. Thus, we\u2019ve built a new extension to provide those features \u2013 <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vscjava.vscode-java-dependency\" target=\"_blank\" rel=\"noopener noreferrer\">Java Dependencies<\/a>.<\/p>\n<p>See below for package and dependency view.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-216777 size-full\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2018\/11\/2018.11.12.PackageViewer.gif\" alt=\"Package and Dependency Viewer\" width=\"1024\" height=\"768\" \/><\/p>\n<p>And create a simple Java project.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-216778 size-full\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2018\/11\/2018.11.12.CreateProject.gif\" alt=\"Create Java project\" width=\"1024\" height=\"768\" \/><\/p>\n<h2>Spring Tool 4 available for Visual Studio Code<\/h2>\n<p>During <a href=\"https:\/\/springoneplatform.io\/\" target=\"_blank\" rel=\"noopener noreferrer\">SpringOne 2018<\/a>, Pivotal announced the release of their brand new <a href=\"https:\/\/spring.io\/tools\" target=\"_blank\" rel=\"noopener noreferrer\">Spring Tool 4<\/a> built on top of the Language Server Protocol developed by Visual Studio Code team, and it\u2019s now available for Visual Studio Code, Eclipse and Atom. Pivotal and Microsoft presented sessions to promote that during both <a href=\"https:\/\/springoneplatform.io\/\" target=\"_blank\" rel=\"noopener noreferrer\">SpringOne<\/a> and <a href=\"https:\/\/www.oracle.com\/code-one\/index.html\" target=\"_blank\" rel=\"noopener noreferrer\">Oracle Code One<\/a>.<\/p>\n<p>Along with <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>, now you can easily create new Spring Boot applications, navigate your source code, have smart code editing, see runtime live information in your editor and manage your running application, all within Visual Studio Code.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-216788\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2018\/11\/sts4_4_a.gif\" alt=\"Spring Tools 4\" width=\"1024\" height=\"768\" \/><\/p>\n<p>View the recording of <a href=\"https:\/\/springoneplatform.io\/2018\/sessions\/hacking-spring-boot-applications-using-visual-studio-code\" target=\"_blank\" rel=\"noopener noreferrer\">Hacking Spring Boot Applications Using Visual Studio Code<\/a> to learn more.<\/p>\n<h2>More improvements for Java in Visual Studio Code<\/h2>\n<p>There\u2019s also lots of additional new features added to our Java on Visual Studio Code extension lineup, including<\/p>\n<p><a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vscjava.vscode-java-debug\" target=\"_blank\" rel=\"noopener noreferrer\">Debugger for Java<\/a><\/p>\n<ol>\n<li>Use code lens to run Java program in a much simpler way.<\/li>\n<li>Add support for <a href=\"https:\/\/code.visualstudio.com\/blogs\/2018\/07\/12\/introducing-logpoints-and-auto-attach\" target=\"_blank\" rel=\"noopener noreferrer\">Logpoints<\/a>.<\/li>\n<li>Add a troubleshooting page for common errors.<\/li>\n<li>Support starting without debugging.<\/li>\n<li>Add new user settings java.debug.settings.enableRunDebugCodeLens to enable\/disable Run|Debug Code Lenses on main methods <a href=\"https:\/\/github.com\/Microsoft\/vscode-java-debug\/issues\/464\" target=\"_blank\" rel=\"noopener noreferrer\">#464<\/a> (Thank you <a href=\"https:\/\/github.com\/ThadHouse\" target=\"_blank\" rel=\"noopener noreferrer\">Thad House<\/a>!)<\/li>\n<li>Add Italian translation for extension configuration <a href=\"https:\/\/github.com\/Microsoft\/vscode-java-debug\/pull\/463\" target=\"_blank\" rel=\"noopener noreferrer\">#463<\/a> (Thank you <a href=\"https:\/\/github.com\/Dotpys\" target=\"_blank\" rel=\"noopener noreferrer\">Julien Russo<\/a>!)<\/li>\n<\/ol>\n<p><a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=adashen.vscode-tomcat\" target=\"_blank\" rel=\"noopener noreferrer\">Tomcat<\/a><\/p>\n<ol>\n<li>Support right click on exploded WAR folder to run it directory Tomcat Server<\/li>\n<li>Support right click on exploded WAR folder to debug it directory on Tomcat Server<\/li>\n<li>Add command &#8220;Generate WAR Package from Current Folder&#8221;<\/li>\n<\/ol>\n<p><a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vscjava.vscode-maven\" target=\"_blank\" rel=\"noopener noreferrer\">Maven<\/a><\/p>\n<ol>\n<li>Supported to fast re-run maven command from history. Added entry for historical commands in context menu.<\/li>\n<li>Supported to trigger maven command from command palette.<\/li>\n<li>Supported to hide Maven explorer view by default.<\/li>\n<li>Started to use a separate terminal for each root folder.<\/li>\n<li>Supported to update explorer automatically when workspace folders change.<\/li>\n<\/ol>\n<p>With the help from <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=redhat.java\" target=\"_blank\" rel=\"noopener noreferrer\">Language Support for Java by Red Hat<\/a>, we now have better support for newer versions of Java (9, 10, and 11), better integrations with the editor (outline, go to implementation), more code actions (convert var to type and vice versa, convert to lambda expression) and various other enhancements.<\/p>\n<h2>Provide feedback<\/h2>\n<p>Your feedback and suggestions are especially important to us and will help shape 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 have a try on using Visual Studio Code for your Java development and let us know your feelings! Visual Studio Code is a lightweight and performant code editor with great Java support especially for building microservices.<\/p>\n<p>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\u2122 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> and <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vscjava.vscode-java-test\" target=\"_blank\" rel=\"noopener noreferrer\">Java Test Runner<\/a>.<\/p>\n<ul>\n<li>Install <a href=\"https:\/\/go.microsoft.com\/fwlink\/?linkid=2006060\" target=\"_blank\" rel=\"noopener noreferrer\">IntelliCode Extension for Visual Studio Code<\/a> to try out the AI-assisted IntelliSense.<\/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 Visual Studio 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=vscjava.vscode-java-dependency\" target=\"_blank\" rel=\"noopener noreferrer\">Java Dependencies<\/a> provides you a package view of your Java project and helps you managing your dependencies.<\/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 Visual Studio Code<\/a>.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Visual Studio IntelliCode is a set of AI-assisted capabilities that aims to improve developer productivity with features like AI-assisted IntelliSense and statement completion, code formatting, and style rule inference. During SpringOne 2018, we announced that we will bring those productivity boosters to Java developers and now we\u2019re happy to introduce AI-assisted IntelliSense to Java in [&hellip;]<\/p>\n","protected":false},"author":668,"featured_media":226938,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[15],"tags":[16,18,12],"class_list":["post-222641","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vscode","tag-announcement","tag-intellicode","tag-visual-studio-code"],"acf":[],"blog_post_summary":"<p>Visual Studio IntelliCode is a set of AI-assisted capabilities that aims to improve developer productivity with features like AI-assisted IntelliSense and statement completion, code formatting, and style rule inference. During SpringOne 2018, we announced that we will bring those productivity boosters to Java developers and now we\u2019re happy to introduce AI-assisted IntelliSense to Java in [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/posts\/222641","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=222641"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/posts\/222641\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/media\/226938"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/media?parent=222641"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/categories?post=222641"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/tags?post=222641"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}