![](http://habrastorage.org/getpro/habr/avatars/c25/d3d/146/c25d3d1466f5335a185358fc99588186.png)
IntelliJ IDEA 16 Public Preview Review
On Friday, February 19th, we released the beta version of IntelliJ IDEA 16 . Considering that a little over three months have passed since the release of IntelliJ IDEA 15, you will be pleasantly surprised by what we managed to do during this time. We invite you to download the latest version right now and try all the improvements yourself, the most important of which I will gladly tell you later.
![image](https://habrastorage.org/getpro/habr/post_images/c45/da5/162/c45da516282777432b1c89efe11ddd42.png)
Debugger
For Java projects in Evaluate Expression and Watches, you can now write expressions in Groovy , which has a more compact syntax, which makes it more convenient, for example, to work with collections.
![image](https://habrastorage.org/getpro/habr/post_images/973/72d/b77/97372db7748c288648e39aac8bf59731.png)
If the current thread is blocked by another stopped thread, then IntelliJ IDEA will offer to unlock it.
Previously, by clicking Resume , all running threads were resumed. Now you can change this behavior by enabling the Resume only the current thread option .
Now IntelliJ IDEA warns whenever it notices that the sources do not match the code being executed. This helps to avoid mistakes and save time.
![image](https://habrastorage.org/getpro/habr/post_images/9be/ab6/364/9beab6364f0cb6fc413d4331cb571d11.png)
Integration with Git and other VCS
IntelliJ IDEA now supports git worktrees - in case you want to work with several revisions of the repository at the same time and save disk space. Two new commands appeared
for Git in the Branches popup : Checkout with Rebase and Rename . Checkout with rebasesaves time if you want to perform these two operations one after another. Diff viewer and Merge dialog
tools have become more convenient due to highlighting changes at the level of specific parts of the line. Editor A new tool has appeared in the editor: Move Element Right / Left ( Alt + Ctrl + Shift + Arrows or Alt + Cmd + Shift + Arrows for OS X). Using it, you can swap the arguments of methods, array elements, and tag attributes.
![image](https://habrastorage.org/getpro/habr/post_images/4ad/a0a/d6c/4ada0ad6c7e2919805e7f879e87f2b2f.png)
![image](https://habrastorage.org/getpro/habr/post_images/36d/6f0/cfe/36d6f0cfeb93f90e0e0110c86de92d07.gif)
We added auto-import for static methods and constants (previously it worked only for classes). The option Add unambiguous imports on the fly now also works for static methods and constants.
![image](https://habrastorage.org/getpro/habr/post_images/b6f/4dd/8fd/b6f4dd8fd61679049ae7c9613f53ae68.png)
The editor supports Arabic, Hebrew and other languages, where characters follow from right to left.
![image](https://habrastorage.org/getpro/habr/post_images/cc1/ccd/71a/cc1ccd71a5dbea791c7d94848991180f.png)
An option has appeared in the style settings for automatically adding a space at the beginning of comments.
Java 8
When calling the Inline method or Change signature , method references are converted to the corresponding lambda expressions.
IntelliJ IDEA will warn if you call get () method on java.util.Optionalwithout checking before using isPresent () whether the value is contained there.
![image](https://habrastorage.org/getpro/habr/post_images/69b/9f8/6f6/69b9f86f65a56e6921539bd7f634ebf1.png)
Added many inspections for the use of functional interfaces, lambda expressions and Optional .
![image](https://habrastorage.org/getpro/habr/post_images/fe3/c0e/37c/fe3c0e37c49447cf57222406505dacf3.png)
If you use Guava , the IDE will offer you to replace FluentIterable , Function , Optional and Predicate with their counterparts from Java 8.
![image](https://habrastorage.org/getpro/habr/post_images/c5e/b8f/f56/c5eb8ff56603d3a02e459d61b0be8033.png)
Quick search
Quick search ( speed-search ) is now available in the Terminal window , the search in the Show usages popup window and in the Find window have also been improved usages . Log viewer
![image](https://habrastorage.org/getpro/habr/post_images/36b/003/1a8/36b0031a85c2418795504a1040aba92e.png)
interfacefor Git and Mercurial now looks a little nicer.
Gradle
The IntelliJ IDEA project model now fully coincides with the Gradle model : each source set is presented in IntelliJ IDEA as a separate module, and therefore can have its own classpath . This allowed to solve a huge number of problems.
IntelliJ IDEA has learned to automatically import EAR artifacts from build scripts.
Spring
to Spring the Boot projects Adding files inside tips YML and banner.txt . Abstract \ @SpringApplicationConfigurationtaken into account when creating launch configurations for tests. For custom configuration properties Find usages now works. Spring MVC
support has been greatly improved by supporting the annotation \ @EnableWebMvc . Fixed a lot of old problems . Thymeleaf Thymeleaf 3 Beta is supported out of the box. Added support for custom dialects: the same hints are now available for them as for standard ones. Many issues with Thymeleaf 2 support fixed . The Android leak profiler and the new inspections introduced in Android Studio 1.5 are now available in IntelliJ IDEA.
![image](https://habrastorage.org/getpro/habr/post_images/08a/ece/fac/08aecefac581915649d1d65d3d3de2cc.png)
![image](https://habrastorage.org/getpro/habr/post_images/1b5/a41/24e/1b5a4124ea7e545477b4486444bc414d.png)
![image](https://habrastorage.org/getpro/habr/post_images/b3f/f88/78c/b3ff8878c11d2b3998a1620202f5b3dd.png)
Kotlin
Yes, if you are not yet in the know (or do not believe your eyes), Kotlin 1.0 was released a week ago .
Kotlin is compatible with Java 6, 7, 8 , Android , and any Java frameworks (such as Java EE , Spring ) and build systems ( Gradle , Maven ). Kotlin can be used in existing Java projects. From version 1.0, Kotlin is backward compatible with its previous versions.
IntelliJ IDEA 16 includes plugins for Kotlin 1.0.
Earlier on Habré the first session of questions and answers was already held .
Scala
While working on Kotlin, we do not forget about Scala: Compline has undergone a number of improvements. First, the order of the proposed options now takes into account factors such as the type of symbol, its history of use, and context. Preference is given to local variables, then arguments, then fields of the class, then methods, etc. If a type is expected in this context, IntelliJ IDEA will take this into account in the order of the proposed options.
![image](https://habrastorage.org/getpro/habr/post_images/eb5/b90/ffa/eb5b90ffa96135cb15df8a5cd253d6e1.png)
Secondly, it appeared compliant for pattern matching expressions with a hint for case class property names .
![image](https://habrastorage.org/getpro/habr/post_images/fb0/a8a/8ae/fb0a8a8aec2e2389f7b128ea40461b61.png)
ES6 and TypeScript
Support for ES6 and TypeScript is getting better every day. Added refactoring Create method , Extract method , Inline method andIntroduce field and make class abstract , Make public / private and Remove modifier . Unused import expressions are now highlighted and removed using Optimize imports . As you type, import expressions are added automatically.
![image](https://habrastorage.org/getpro/habr/post_images/898/11f/d63/89811fd63f9d089c2f19ab56188c4201.png)
Added support for TypeScript 1.8 .
AngularJS
For AngularJS 2 , complimentary directives, template variables, custom event handlers, paths in the templateUrl and styleUrls fields, as well as event , data , and property bindings, have been added .
![image](https://habrastorage.org/getpro/habr/post_images/48c/f8b/94a/48cf8b94a14fc4e65c1674379fd1f2b8.png)
IntelliJ IDEA also understands components defined using module.component (), added in AngularJS 1.5.
JavaScript debugger
With the new debugger for Chrome, it’s much easier to debug asynchronous code and code with lambda expressions ( arrow functions ). For asynchronous code, the frame stack includes the location where the asynchronous code is called. When adding breakpoints, you can now select a specific lambda expression.
You can also debug main and render processes of Electron applications.
JSON
In addition, IntelliJ IDEA now supports JSON schema and offers on its basis compliment inside JSON files (tsconfig.json, .eslintrc, .babelrc and many others).
![image](https://habrastorage.org/getpro/habr/post_images/447/6b0/e5e/4476b0e5e841c31c65ee9d08e288a970.png)
Working with databases
After the release of DataGrip, we continue to improve database support and tools for working with them. Added support for some PostgreSQL 9.5 statements ( hstore? ) As well as User Defined Table and Column Types for SQL Server . Using Create / Modify Table, you can now edit comments for columns (if supported by the database).
![image](https://habrastorage.org/getpro/habr/post_images/f1d/6b7/0c9/f1d6b70c9c331cb9f841efc25d131f47.png)
If you want to delete data from tables, a new tool will help you: Truncate , which allows you to very quickly and without transaction remove data from one or more tables.
![image](https://habrastorage.org/getpro/habr/post_images/e81/8a2/b77/e818a2b77ab427fe31cf24b8b6e65fdd.png)
Docker
and finally dockerbecame a separate window ( tool window ) and its interface is gradually getting better and better: now the right panel displays logs and allows you to edit container settings. Images and containers are now shown separately and more clearly. We also supported the Docker Machine .
![image](https://habrastorage.org/getpro/habr/post_images/83b/575/4ca/83b5754ca4c1c8cd9d51ccb233682c6b.png)
If you want me to write about some of the new features separately (or about some old features), ask in the comments and I will write with pleasure. I will also be happy to answer any questions.
![image](https://habrastorage.org/getpro/habr/post_images/c45/da5/162/c45da516282777432b1c89efe11ddd42.png)
Debugger
For Java projects in Evaluate Expression and Watches, you can now write expressions in Groovy , which has a more compact syntax, which makes it more convenient, for example, to work with collections.
![image](https://habrastorage.org/getpro/habr/post_images/973/72d/b77/97372db7748c288648e39aac8bf59731.png)
If the current thread is blocked by another stopped thread, then IntelliJ IDEA will offer to unlock it.
Previously, by clicking Resume , all running threads were resumed. Now you can change this behavior by enabling the Resume only the current thread option .
Now IntelliJ IDEA warns whenever it notices that the sources do not match the code being executed. This helps to avoid mistakes and save time.
![image](https://habrastorage.org/getpro/habr/post_images/9be/ab6/364/9beab6364f0cb6fc413d4331cb571d11.png)
Integration with Git and other VCS
IntelliJ IDEA now supports git worktrees - in case you want to work with several revisions of the repository at the same time and save disk space. Two new commands appeared
for Git in the Branches popup : Checkout with Rebase and Rename . Checkout with rebasesaves time if you want to perform these two operations one after another. Diff viewer and Merge dialog
tools have become more convenient due to highlighting changes at the level of specific parts of the line. Editor A new tool has appeared in the editor: Move Element Right / Left ( Alt + Ctrl + Shift + Arrows or Alt + Cmd + Shift + Arrows for OS X). Using it, you can swap the arguments of methods, array elements, and tag attributes.
![image](https://habrastorage.org/getpro/habr/post_images/4ad/a0a/d6c/4ada0ad6c7e2919805e7f879e87f2b2f.png)
![image](https://habrastorage.org/getpro/habr/post_images/36d/6f0/cfe/36d6f0cfeb93f90e0e0110c86de92d07.gif)
We added auto-import for static methods and constants (previously it worked only for classes). The option Add unambiguous imports on the fly now also works for static methods and constants.
![image](https://habrastorage.org/getpro/habr/post_images/b6f/4dd/8fd/b6f4dd8fd61679049ae7c9613f53ae68.png)
The editor supports Arabic, Hebrew and other languages, where characters follow from right to left.
![image](https://habrastorage.org/getpro/habr/post_images/cc1/ccd/71a/cc1ccd71a5dbea791c7d94848991180f.png)
An option has appeared in the style settings for automatically adding a space at the beginning of comments.
Java 8
When calling the Inline method or Change signature , method references are converted to the corresponding lambda expressions.
IntelliJ IDEA will warn if you call get () method on java.util.Optionalwithout checking before using isPresent () whether the value is contained there.
![image](https://habrastorage.org/getpro/habr/post_images/69b/9f8/6f6/69b9f86f65a56e6921539bd7f634ebf1.png)
Added many inspections for the use of functional interfaces, lambda expressions and Optional .
![image](https://habrastorage.org/getpro/habr/post_images/fe3/c0e/37c/fe3c0e37c49447cf57222406505dacf3.png)
If you use Guava , the IDE will offer you to replace FluentIterable , Function , Optional and Predicate with their counterparts from Java 8.
![image](https://habrastorage.org/getpro/habr/post_images/c5e/b8f/f56/c5eb8ff56603d3a02e459d61b0be8033.png)
Quick search
Quick search ( speed-search ) is now available in the Terminal window , the search in the Show usages popup window and in the Find window have also been improved usages . Log viewer
![image](https://habrastorage.org/getpro/habr/post_images/36b/003/1a8/36b0031a85c2418795504a1040aba92e.png)
interfacefor Git and Mercurial now looks a little nicer.
Gradle
The IntelliJ IDEA project model now fully coincides with the Gradle model : each source set is presented in IntelliJ IDEA as a separate module, and therefore can have its own classpath . This allowed to solve a huge number of problems.
IntelliJ IDEA has learned to automatically import EAR artifacts from build scripts.
Spring
to Spring the Boot projects Adding files inside tips YML and banner.txt . Abstract \ @SpringApplicationConfigurationtaken into account when creating launch configurations for tests. For custom configuration properties Find usages now works. Spring MVC
support has been greatly improved by supporting the annotation \ @EnableWebMvc . Fixed a lot of old problems . Thymeleaf Thymeleaf 3 Beta is supported out of the box. Added support for custom dialects: the same hints are now available for them as for standard ones. Many issues with Thymeleaf 2 support fixed . The Android leak profiler and the new inspections introduced in Android Studio 1.5 are now available in IntelliJ IDEA.
![image](https://habrastorage.org/getpro/habr/post_images/08a/ece/fac/08aecefac581915649d1d65d3d3de2cc.png)
![image](https://habrastorage.org/getpro/habr/post_images/1b5/a41/24e/1b5a4124ea7e545477b4486444bc414d.png)
![image](https://habrastorage.org/getpro/habr/post_images/b3f/f88/78c/b3ff8878c11d2b3998a1620202f5b3dd.png)
Kotlin
Yes, if you are not yet in the know (or do not believe your eyes), Kotlin 1.0 was released a week ago .
Kotlin is compatible with Java 6, 7, 8 , Android , and any Java frameworks (such as Java EE , Spring ) and build systems ( Gradle , Maven ). Kotlin can be used in existing Java projects. From version 1.0, Kotlin is backward compatible with its previous versions.
IntelliJ IDEA 16 includes plugins for Kotlin 1.0.
Earlier on Habré the first session of questions and answers was already held .
Scala
While working on Kotlin, we do not forget about Scala: Compline has undergone a number of improvements. First, the order of the proposed options now takes into account factors such as the type of symbol, its history of use, and context. Preference is given to local variables, then arguments, then fields of the class, then methods, etc. If a type is expected in this context, IntelliJ IDEA will take this into account in the order of the proposed options.
![image](https://habrastorage.org/getpro/habr/post_images/eb5/b90/ffa/eb5b90ffa96135cb15df8a5cd253d6e1.png)
Secondly, it appeared compliant for pattern matching expressions with a hint for case class property names .
![image](https://habrastorage.org/getpro/habr/post_images/fb0/a8a/8ae/fb0a8a8aec2e2389f7b128ea40461b61.png)
ES6 and TypeScript
Support for ES6 and TypeScript is getting better every day. Added refactoring Create method , Extract method , Inline method andIntroduce field and make class abstract , Make public / private and Remove modifier . Unused import expressions are now highlighted and removed using Optimize imports . As you type, import expressions are added automatically.
![image](https://habrastorage.org/getpro/habr/post_images/898/11f/d63/89811fd63f9d089c2f19ab56188c4201.png)
Added support for TypeScript 1.8 .
AngularJS
For AngularJS 2 , complimentary directives, template variables, custom event handlers, paths in the templateUrl and styleUrls fields, as well as event , data , and property bindings, have been added .
![image](https://habrastorage.org/getpro/habr/post_images/48c/f8b/94a/48cf8b94a14fc4e65c1674379fd1f2b8.png)
IntelliJ IDEA also understands components defined using module.component (), added in AngularJS 1.5.
JavaScript debugger
With the new debugger for Chrome, it’s much easier to debug asynchronous code and code with lambda expressions ( arrow functions ). For asynchronous code, the frame stack includes the location where the asynchronous code is called. When adding breakpoints, you can now select a specific lambda expression.
You can also debug main and render processes of Electron applications.
JSON
In addition, IntelliJ IDEA now supports JSON schema and offers on its basis compliment inside JSON files (tsconfig.json, .eslintrc, .babelrc and many others).
![image](https://habrastorage.org/getpro/habr/post_images/447/6b0/e5e/4476b0e5e841c31c65ee9d08e288a970.png)
Working with databases
After the release of DataGrip, we continue to improve database support and tools for working with them. Added support for some PostgreSQL 9.5 statements ( hstore? ) As well as User Defined Table and Column Types for SQL Server . Using Create / Modify Table, you can now edit comments for columns (if supported by the database).
![image](https://habrastorage.org/getpro/habr/post_images/f1d/6b7/0c9/f1d6b70c9c331cb9f841efc25d131f47.png)
If you want to delete data from tables, a new tool will help you: Truncate , which allows you to very quickly and without transaction remove data from one or more tables.
![image](https://habrastorage.org/getpro/habr/post_images/e81/8a2/b77/e818a2b77ab427fe31cf24b8b6e65fdd.png)
Docker
and finally dockerbecame a separate window ( tool window ) and its interface is gradually getting better and better: now the right panel displays logs and allows you to edit container settings. Images and containers are now shown separately and more clearly. We also supported the Docker Machine .
![image](https://habrastorage.org/getpro/habr/post_images/83b/575/4ca/83b5754ca4c1c8cd9d51ccb233682c6b.png)
If you want me to write about some of the new features separately (or about some old features), ask in the comments and I will write with pleasure. I will also be happy to answer any questions.