技术控

    今日:0| 主题:63445
收藏本版 (1)
最新软件应用技术尽在掌握

[其他] Fresh EAP with Refactorings to Java 8, Better VCS and Gradle Integrations

[复制链接]
夢中那抹笑、 发表于 2016-10-6 23:48:23
342 6
A new IntellIJ IDEA 2016.3 EAP build is out and ready to try. Other than the usual amount ofbugfixes, it brings a couple of noticeable improvements.
  More Refactorings to Java 8

  First of all, we continue with tuning the inspections that help refactor regular code into idiomatic Java 8.
  Now, when it’s appropriate, IntelliJ IDEA will prompt to replace certain code with:
  
       
  • Map.computeIfAbsent .

    Fresh EAP with Refactorings to Java 8, Better VCS and Gradle Integrations

    Fresh EAP with Refactorings to Java 8, Better VCS and Gradle Integrations
       
  • Collections.removeIf :

    Fresh EAP with Refactorings to Java 8, Better VCS and Gradle Integrations

    Fresh EAP with Refactorings to Java 8, Better VCS and Gradle Integrations
       
  • Map.getOrDefault :

    Fresh EAP with Refactorings to Java 8, Better VCS and Gradle Integrations

    Fresh EAP with Refactorings to Java 8, Better VCS and Gradle Integrations
      
  As you can see, such inspections can make code much shorter and easier to read. For instance, look at the sample from a real codebase:
   

Fresh EAP with Refactorings to Java 8, Better VCS and Gradle Integrations

Fresh EAP with Refactorings to Java 8, Better VCS and Gradle Integrations

  Just as with any other inspection, these can be run in batch mode on any scope withing your project.
  Better VCS Integration

   Earlier wementioned that the layout of the  Log viewer has been reworked to made it more compact. With this build, we’ve stepped even further and redesigned the branch labels:
   

Fresh EAP with Refactorings to Java 8, Better VCS and Gradle Integrations

Fresh EAP with Refactorings to Java 8, Better VCS and Gradle Integrations

  Labels have been moved to the right side and are now displayed in a more elegant way. As a result, there’s more space for displaying the commit messages. Also, we’ve decided not to show tag names in this mode. If a branch and its tracked branch are on the same commit, they are displayed as “origin & master” (instead of “origin/master” + “master”).
   A subtle, yet helpful improvement is the full syntax highlighting for non-local revisions in the Diff and Merge dialogs:
   

Fresh EAP with Refactorings to Java 8, Better VCS and Gradle Integrations

Fresh EAP with Refactorings to Java 8, Better VCS and Gradle Integrations

  To get it working, we’re building the PSI tree rather than relying on lexer tokens. As a nice side-effect, you get the code navigation here as well.
   Also, we’ve added line markers to the Merge dialog to indicate actual changes to the base revision:
   

Fresh EAP with Refactorings to Java 8, Better VCS and Gradle Integrations

Fresh EAP with Refactorings to Java 8, Better VCS and Gradle Integrations

  We believe this will make it easier to understand what changes are actually going to be applied.
  Delegating IDE build/run actions to Gradle

   Last but not least, for Gradle projects, we’ve added an option that delegates the native IntelliJ IDEA Build, Build Artifacts (both WAR and EAR) and  Run actions to Gradle: SettingsBuild, Execution, DeploymentBuild ToolsGradleRunnerDelegate IDE build/run actions to gradle .
   

Fresh EAP with Refactorings to Java 8, Better VCS and Gradle Integrations

Fresh EAP with Refactorings to Java 8, Better VCS and Gradle Integrations

   When this option is selected, all these actions are performed via corresponding Gradle tasks. The Run action is delegated to the dynamic Gradle  JavaExec task configured according to the run configuration. Exploded artifacts aren’t supported yet, but we’re working on it.
   That’s it for now. You’re welcome to give these new features a try by downloading thenew build–just as your feedback is welcome in ourissue tracker.
  Develop with Pleasure!
  

Fresh EAP with Refactorings to Java 8, Better VCS and Gradle Integrations

Fresh EAP with Refactorings to Java 8, Better VCS and Gradle Integrations
一厘米的距离ゃ 发表于 2016-10-7 18:48:42
现在问题来了,“挖掘机技术哪家强?中国山东找蓝翔”
回复 支持 反对

使用道具 举报

丶____磊磊 发表于 2016-10-9 18:31:26
叮铃叮铃,楼主开门,我是送快递的!
回复 支持 反对

使用道具 举报

何治浮 发表于 2016-10-28 12:27:13
路过,帮顶!
回复 支持 反对

使用道具 举报

左校花右萌主 发表于 2016-11-11 09:37:50
纯粹路过,没任何兴趣,仅仅是看在老用户份上回复一下
回复 支持 反对

使用道具 举报

都市达人 发表于 2016-11-13 22:13:45
夢中那抹笑、写的很经典!
回复 支持 反对

使用道具 举报

刘一山 发表于 2016-11-18 10:37:55
我为夢中那抹笑、转身!
回复 支持 反对

使用道具 举报

我要投稿

推荐阅读


回页顶回复上一篇下一篇回列表
手机版/c.CoLaBug.com ( 粤ICP备05003221号 | 粤公网安备 44010402000842号 )

© 2001-2017 Comsenz Inc.

返回顶部 返回列表