Chain Completion, which was available on the second call of Smart Completion, gets even better. Now the suggestions are displayed after the first call of Smart Completion, and they’re sorted by how frequently they’re used in the project. This feature works only for Java and requires the project to be built with the IDE’s (not Gradle’s) compiler.
Smart Completion is now aware of builder classes in the project and suggests their usage where relevant.
Control flow analysis
Control flow analysis has become much smarter and now detects a wider variety of problems in the code.
For example, if Collection#isEmpty() returns true, the IDE understands that there are no elements in that collection to iterate over.
The IDE also understands that String#charAt(int index) throws an exception when called with an empty string, or when the index exceeds the value returned by the String#length() method.
The same intelligence applies to: String#isEmpty(), String#charAt(int index), List#get(int index), Set#contains(Object item), Map#containsKey(Object key), Map#containsValue(Object value), and many other methods.
The IDE also gains a better understanding of reporting nullability issues, in particular when it comes to working with Collection and Map type parameters.
Java 9 module diagrams
Embracing Java 9 and its new module system, the preview introduces Module Diagrams. Use them to see the dependencies between the selected modules. To see the diagram, invoke Diagrams | Show Diagram (Ctrl+Alt+Shift+U), and then choose Java Modules Diagram.
The diagram works for JRE modules as well.
Refactoring to Java 9
The IDE finds the code where you construct sets and pre-fill them with data, and suggests replacing it with Set#of(String…items) where possible.
The IDE finds the loops spinning on a volatile field and suggests calling Thread#onSpinWait() inside such a loop. This call may significantly improve the performance of your code.
Extracting an expression as a map operation
Now, when you call Extract Variable inside a Stream API map call, the IDE offers to extract it as a separate map() expression.
Extracting a functional variable
Embracing Java 8 in one of the earlier releases, we introduced Extract Functional Parameter. With this preview, we’re going further and introducing Extract Functional Variable.
Extracting a lambda to a method reference
IntelliJ IDEA now offers you a quick-fix that replaces a lambda expression with a method reference. This combines Extract Method and Replace Lambda with Method Reference.
Replacing multiple equals with Set.contains
When you are checking whether an expression is equal to one of several literals, the IDE now offers you to replace these checks with a Set#contains(Object key) call.
JUnit 5 M4: parameterized and repeated tests
Following the recent JUnit 5 changes, the IDE adds dedicated coding assistance for Parameterized Tests and Repeated Tests.
Coding assistance for Reflection has gotten better. Also, we’ve introduced similar coding assistance for Method Handlers and Variable Handlers.
IntelliJ IDEA provides code completion for method and field names as well as their signatures.
Filtering arrays & collections
The debugger now allows you to filter arrays and collections in Variables, Watches, Evaluate Expression and other similar views.
Java Stream Debugger
Out of the release scope, but you may also find it interesting to know that recently we introduced a new plugin called Java Stream Debugger. This plugin provides visualization of Java Stream operations.
You can use the plugin if you’re running IntelliJ IDEA 2017.1 or newer.
For Spring Boot applications, the traditional Run tool window has been replaced with Run Dashboard. This dashboard lets you manage Run configurations and see their application-specific information on the right.
For Spring Boot applications, the Run/Debug tool window now has a tab called Endpoints. This tab shows information about the Health, Beans, and Mappings endpoints.
When Gradle is downloading a wrapper distributive, the IDE now displays the progress bar in both the Console tool window and the Background Tasks popup.
When you run a Gradle task via a Run Configuration, you can now specify and/or override environment variables.
On macOS, the Gradle build is now consistent with the command line behavior because the IDE now respects environment variables defined on the system level.
Now, if you enable Semantic highlighting in the Colors & Fonts settings, the IDE highlights the definitions and all occurrences of local variable, and parameter with a distinct color.
The usages of the TODO() method are now highlighted in the editor as TODOs and shown in the TODO tool window.
To make the code even more readable, the editor now shows hints for the parameter names in method calls where the meaning of the arguments may not be clear from the context.
Similarly to Parameter Hints, the editor now is capable of showing inferred types for the variables, functions, and parameters. This functionality is disabled by default; you can enable it in the editor appearance settings.
The update brings the support for the new features introduced with Groovy 2.5.0: @groovy.transform.builder.Builder#includeSuperProperties, @groovy.transform.AutoImplement, and @groovy.lang.Delegate for methods
Debugging in SBT Shell
Earlier this year we introduced SBT Shell to make the work with SBT projects more convenient. Now, you can easily attach a Debugger to it with just one click.
Play 2.6 support
The support for Play Framework has been updated according to its latest version.
The Type Annotations inspection has been improved with implicit declarations processing. Any implicit is worth being explicitly annotated. It significantly increases the performance of compilation and IDE code analysis. It reduces the risk of a type inconsistency.
Completion for implicits
Now, if you call Smart Completion for following types: akka.actor.ActorRef, scala.concurrent.Future, it also suggests implicit conversions, and adds import statements automatically.
Reverting and rewording commits
The Git Log now provides two new actions: Revert and Reword. The first one lets you revert selected commits.
The second one lets you change the commit message for any commits that have not been pushed yet.
Formatting commit messages
The settings related to the Commit dialog have been reworked and moved to a separate page called Commit Dialog.
The new settings let you customize the rules applied to commit messages: a blank line between the subject and the body, and the maximum length. Also, now the IDE offers a quick fix and the Reformat action inside Commit Message.
The Shelf tab has been reworked for better performance and ergonomics.
The Show Diff action now by default compares the shelved version to the base version instead of local (when possible). The old behaviour, which is comparing to the local version, is available via the Compare with Local action (listed in the context menu).
The raw patch content can be viewed in the Preview tab.
Find in Path
The Preview panel in Find in Path now has a Gutter (a left-hand pane like that in the editor) with line numbers, navigation icons, and local change markers.
Search results from the same lines are now merged together.
A small icon indicates when a search is in progress.
Window 10 native UI
The appearance of certain UI elements on Windows 10 has been updated to follow the system look and feel. This includes buttons, radio buttons, checkboxes, text fields, select controls, spinner and a few others.
Better HiDPI support
The IDE used to scale its UI based on the global settings of the primary display. This scale factor was applied even to non-primary monitors. Now it scales its UI based on the scale factor for the monitor the UI is shown on. This improvement has a limitation: it works only for Windows and doesn’t support fractional values.
The font settings are now automatically adjusted based on the display resolution.
Parameter hints and type info
Parameter hints make the code easier to read by showing parameter names in method and function calls. Now, you can also now see the inferred type for objects by hovering over them with the mouse and holding Ctrl.
Import code style from .eslintrc
Move symbol refactoring
With the new Move Symbol refactoring you can now safely move classes, global functions or variables across ES6 modules – all the imports and exports will be updated automatically.
Support for Angular Material improvement: you can now use code completion and navigation for the Material attributes in addition to completion, for the components that were available before.
Code coverage for Mocha
Run Mocha tests with coverage and see the coverage reports created by Istanbul right in the IDE. The report shows how many files were covered with tests and the percentage of covered lines in them. From it, you can jump to the file and see what lines were and were not covered.
The preview brings a new experimental feature called Unloaded Modules. This feature gives you the ability to select which modules you are going to work on in your project. Those you are not working with at the moment are marked as Unloaded. The IDE will not index or otherwise touch any files in Unloaded Modules. This helps conserve CPU and memory resources when dealing with large codebases.
To access the feature, invoke the Project tree context menu and select Load/Unload Modules.
Then, if you’re are looking for usages of a symbol, or are about to refactor something, the IDE will warn that there are unloaded modules that depend on the modules you are working with, and therefore might contain code that should have been affected by the action, but won’t be.
Excluding files by pattern
To remove irrelevant files from search results and also improve indexing performance, now it's possible to specify a set of filename patterns to be excluded from indexing.
The indexing process now can be paused, e.g. if you need your CPU power for an urgent task.