What's New in IntelliJ IDEA

Welcome IntelliJ IDEA 2016.1, the first update in the series of the releases planned for 2016. Take advantage of further improved coding assistance for Java 8, Kotlin, Scala, JavaScript and across supported frameworks.

Debugger

Groovy expressions

Now when debugging a Java application, you can use Groovy expressions with Evaluate Expression and Watches. Previously you could do that only when debugging Groovy code. This is good because Groovy expressions are much shorter and more expressive (especially when you work with collections).

Threads

Until now, stepping over one thread meant IntelliJ IDEA would also resume all the other threads. Now you can change this behavior by enabling the Resume only the current thread option.

The debugger is now also aware that your current thread is being blocked by another suspended thread, and suggests resumeing it.

Sources mismatch detection

It might be very annoying and counterproductive if you're stepping over your code unaware that it does't actually match the running code. To avoid any unnecessary time waste, the IDE now immediately warns you once it sees a mismatch.

Debugging without debug info

When you debug code compiled without debug info, you are provided with better name matching, and allowed to set and evaluate values for slot variables.

Version control

Git

Two new actions are available via the Branches popup: Checkout with Rebase and Rename.

The Checkout Tag or Revision action is now applied to all repositories configured for the project.

If you do an Interactive Rebase, IntelliJ IDEA now automatically stashes and unstashes local changes and assists with resolving conflicts.

Git 2.5 introduced worktrees to simplify working with clones of a single repository: instead of making a repository clone you can create a lightweight worktree. Now IntelliJ IDEA lets you work with those worktrees just like you do with regular repositories.

By-word changes highlighting

Merging and comparing revisions with Git and other VCS just got easier with the added by-word difference highlighting.

Now you can also disable inspections in the Diff Viewer to minimize distraction.

Compare revisions between branches

For Mercurial we've made it possible to compare revisions of a file between branches (previously possible only within a single branch).

Editor

Move element right and left

Sometimes it might be useful to move statements to the left or right, for example when you're reordering the attributes of an XML element, method parameters, or elements in an array initializer.

To help you do it quicker, we’ve added two new actions: Alt + Ctrl + Shift + Left or Right, respectively (Alt + Cmd + Shift + Left/Right for OS X).

Importing static members

Previously IntelliJ IDEA provided a quick-fix to import static methods. Now it suggests adding static imports in the very same way as it does with regular ones. Static constants are suggested, too.

If you enable Add unambiguous imports on the fly, IntelliJ IDEA will import unambiguous static members on the fly.

Right-to-left languages

IntelliJ IDEA adds support for right-to-left languages (Arabic, Hebrew) to the editor.

Prepend comments with a space

The code styles now provide an option to always prepend automatically added comments with a space.

Inspections

Method references and lambda expressions

The Inline and Change signature refactorings have been updated to correctly process method references.

The IDE will warn you if you call a method of a functional interface which is directly invoked on the definition of a lambda, method reference or anonymous class. The inspection provides a quick-fix to replace it with the body of the functional interface implementation.

Also, the IDE will report method references which point to a method of their own functional interface type and hence can be replaced with their qualifiers.

Overloaded methods or constructors with similar functional interface type parameters, for which any call sites will need a cast or parameter type specified on the lambda expression to resolve ambiguity, may now be reported as well.

Misuse of java.util.Optional

The IDE will help you avoid writing unsafe code when using java.util.Optional: it will warn you if you call get() without first calling isPresent() to check if the value is available.

Also, the IDE may warn you if you use java.util.Optional<T>, java.util.OptionalDouble, java.util.OptionalInt, java.util.OptionalLong or com.google.common.base.Optional as the type for a field or a parameter, or if you use java.util.Optional or com.google.common.base.Optional types with an array or collection type parameter. Note that this setting is disabled by default.

Migrating Guava code to Java 8

For those who would like to migrate their Guava code to Java 8 APIs, we’ve added a number of quick-fixes that help to replace FluentIterable, Function, Optional, and Predicate with Java 8 analogues.

Concurrency annotations

The built-in inspections that detect issues with use of concurrency annotations now support javax.annotation.concurrent.* (previously reported only for net.jcip.annotations.*).

Declaration access can be weaker

The new inspection called Declaration access can be weaker prevents making fields, methods and classes public unnecessarily. Enable it on the scopes you need.

Ignoring duplicates in generated code

The inspection that finds duplicated code now provides an option to ignore the sources marked as generated.

Speed search

Show usages

We have improved the speed-search in the Show usages popup. Now, when you use it, the matches are highlighted for easier navigation.

Terminal

Now you can enjoy the speed search even in the Terminal tool window.

Gradle

Custom source sets

The IntelliJ IDEA project model is finally aligned with that of Gradle and supports custom source sets, by resolving dependencies between individual source sets. This improvement fixes a great number of issues.

Importing EAR artifacts

IntelliJ IDEA now can resolve EAR artifacts defined in your build scripts and configures them automatically in Project Structure.

Spring Frameworks

Spring Boot

The IDE now helps you find usages of your custom configuration properties in your application configuration files and additional metadata files.

Enjoy coding assistance in YAML configuration and banner.txt files.

@SpringApplicationConfiguration is respected in test context setups.

For more details, see the blog post.

Spring MVC

Finally, we’ve added support for @EnableWebMvc-based as and improved working with Java-config only setups.

Spring Core

  • The aliases defined with @AliasFor for @Bean, @Import and @ContextConfiguration are fully supported.
  • Added support for @EnableBatchProcessing, @EnableLoadTimeWeaving and @EnableSpringDataWebSupport annotation.
  • Non-annotated beans that extend CrudRepository now are resolved correctly.
  • Support for Spring 4.3: @Autowired is not required if the bean only defines one constructor.
  • The facet configuration now processes dependencies recursively.
  • A lot of auto-wiring issues have been fixed, as well as the performance has been greatly improved.
  • For more details, see the complete list of resolved issues.

Thymeleaf

The built-in coding assistance has been updated to support Thymeleaf 3, the new version of the popular template engine.

Many issues related to Thymeleaf 2 have been also fixed.

With Thymeleaf users may create their own dialects or extending the standard one. IntelliJ IDEA now understands user-defined dialects and offers coding assistance for them.

Android

IntelliJ IDEA ships with the new features added in Android Studio 1.5.

  • The memory profiler can now assist you in detecting the causes of leaked activities.
  • Several new lint checks.

Kotlin

After a long and exciting road, Kotlin has finally reached the first big 1.0. Welcome the first-class programming language for JVM and Android in IntelliJ IDEA.

Scala

Code completion for Scala has been significantly improved. For case classes in pattern matching the IDE now suggests parameter names based on the corresponding field names and their types.

The order of suggestions now depends on the type of symbol and its usage history. The IDE prioritizes local variables, then parameters, then fields, then methods, etc. If the IDE expects a type, it will take that also into account.

JavaScript

ECMAScript 6 and TypeScript

The new refactorings include Create method, Extract method, Inline method and Introduce field.

The new intentions include Make class abstract, Make public/private and Remove modifier.

Any unused import statement is now highlighted. To remove all unused statements, call Optimize imports. Required import statements are added as you type.

Support for TypeScript has been updated to v1.8.

AngularJS 2

Code insight and navigation are available for directives, variables defined in templates, custom event handlers, paths in templateUrl and styleUrls fields, and many other situations.

Enjoy coding assistance for event and property bindings, which also works inside any data binding.

Also, the IDE now understands components defined using the new AngularJS 1.5 module.component() helper method.

Debugger

The JavaScript debugger for Chrome now makes lots of new things possible. Debug asynchronous client-side code and arrow functions in ECMAScript 6, and stop on the breakpoints set in Web workers.

Also, the IDE now allows you to debug an app’s main process in a built or packaged Electron application, by using Node.js run/debug configuration. You can also debug render process by using Chromium remote debug configuration.

JSON Schema

Thanks to support for JSON Schema, a format for describing JSON files, IntelliJ IDEA can now provide coding assistance for certain types of JSON files. You can add one of the schemas available in the project’s repository, or create your own schema and then map it to a specific JSON file in your project. Code completion for tsconfig.json, .eslintrc and .babelrc is now powered by JSON Schema.

Database Tools

PostgreSQL

IntelliJ IDEA provides coding assistance the features added in PostgreSQL 9.5.

We've also added support for the PostgreSQL hstore ‘?’ operator.

Table and column comments

Table and column comments now can be added and modified from the Create/Modify Table dialog (if the database supports that).

SQL Server

Custom types in SQL Server (alias types and table types) are now introspected and available for completion.

Table truncation

Sometimes you may want to removes all rows from selected tables. Our new action is at your help.

Docker

The Docker plugin has been improved in many ways:

  • We’ve added support for Docker Machine
  • The IDE now offers a separate tool window for Docker.
  • The right-side panel now allows you to see logs and manage environment variables and port bindings.
  • The lists of containers and images are now separate and more readable.

Choose
your edition

Community

For JVM and Android development

Ultimate

For web and enterprise development
Java, Kotlin, Groovy, Scala
Android ?
Maven, Gradle, SBT
Git, SVN, Mercurial, CVS
Perforce, ClearCase, TFS
JavaScript, TypeScript ?
Java EE, Spring, GWT, Vaadin, Play, Grails, Other Frameworks ?
Database Tools, SQL