IntelliJ IDEA 2017.3 ready to show its face: Public Preview build available for download
© Shutterstock / stockcreations
Good news — you can now download the public preview build for IntelliJ IDEA 2017.3. Let’s have a look at the highlights of the upcoming release.
Almost there — IntelliJ IDEA 2017.3 is almost upon us but until then, let’s enjoy the public preview!
You can download the public preview build now.
IntelliJ IDEA 2017.3 highlights
There are plenty of improvements made to the data flow analysis in IntelliJ IDEA 2017.3. For example, the IDE now detects possible nullability issues in Stream API call chains.
Furthermore, it’s now possible to replace StringBuilder usages with Stream.collect and Collectors.joining and you can replace code that iterates to find a maximum or a minimum with Stream.max and Stream.min.
The JetBrains team has also made the data flow analysis for the Optional type even smarter — it can now detect issues that were not obvious. What’s more, the updated inspection infers nullability annotations for parameters of sealed and private methods and offers a quick-fix to explicitly declare the inferred annotation.
You’ll be able to detect and fix redundant throws declarations on the fly and, for deprecated code, the IDE will suggest a quick-fix if there is a replacement method in the JavaDoc. The inspection for Inverting a boolean method is also available on-the-fly and the IDE now detects duplicating Map keys and duplicating Set elements.
You’ll also notice new inspections for the Fuse Stream API call chain, as well as a new intention action called Unroll loop. (There’s an easy way to find all the new inspections. Open the Settings/Preferences dialog select Editor | Inspections, and click on the Filter icon.)
Last but not least, Smart Completion is aware of type casts and uses them to suggest chains of method calls.
You’ll probably enjoy the new Overhead tab in the Debugger tool window, which displays the overhead added either when stepping over the code or when Data Renderers evaluate values.
There’s also the new On-demand Data Renderers feature that helps reduce overhead. You can now do the evaluation of the values in Variables, Watches, and other places on demand. All you have to do is click on them when needed (no need to have them evaluated automatically).
You need to go to the Data Renderers settings page in order to enable On-demand Data Renderers for each renderer. Keep in mind that a renderer can be “muted” from the context menu.
Async stacktraces — new Instrumenting agent
The aim of the Async Stacktraces feature is to show the combined stack traces of all threads. The upcoming IntelliJ IDEA release extends the Async Stacktraces feature with a new Instrumenting agent; it offers almost the same functionality and works out of the box as common capture points are built-in. Furthermore, it causes very low overhead and the option is enabled by default.
Java Stream Debugger
The Java Stream Debugger plugin (it visualizes Java Stream operations) is built into IntelliJ IDEA 2017.3; it is available inside the Debugger tool window. Its purpose is to evaluate the current data stream and present a visual representation of what happens to each element, from the first call to the last.
You can toggle the way operations are displayed (individually or all at once) — for that, you’ll need to use the Split Mode / Flat Mode button.
Good ol’ Gradle
The coming IntelliJ IDEA release will allow you to run tests with coverage with Gradle Test Runner. You can still do it even if you select the option Delegate IDE build/run action to gradle.
To choose how to run your tests with coverage per test, enable the option Let me choose per test (In the Preferences window): with the platform test runner, or with the gradle test runner. You can select the test runner type from the editor.
You can also run tests with coverage from the editor, even if you delegate a test to Gradle.
Build tool window
There’s also a new Build tool window as a single place to view all of the output related to a Gradle build. Previously, the output of a Gradle build was displayed in different places depending on the context, including the Run or Messages windows. In some cases, it was even hidden as a background process.
If a project is set to auto-import, it will be automatically rebuilt when there are changes that affect a Gradle build. One of the best things about the new Build tool window is that it shows the progress of this process.
The build output will still be displayed in the Build tool window even when you enable Delegate IDE build/run actions to gradle.
Java EE 8
IntelliJ IDEA 2017.3 expands its support for the key features in Java EE 8. The IDE now supports Asynchronous CDI Events, and allows you to easily navigate between the place where the event was fired and where this event was received. This is done by using icons in the gutter.
Spring and Spring Boot
Developers, rejoice — The IDE now automatically detects the Spring configuration in your code. It will automatically create a Spring facet for your project, or will alert you if any configuration is missing.
The Spring Beans Dependencies diagram has been extended with a new Neighborhood Mode feature — it basically lets you choose only the necessary beans and only view their dependencies.
For Spring Boot MVC web applications, the IDE now automatically detects an MVC context. A Web Facet and a Spring Boot MVC Context will be set up automatically. Furthermore, it fully supports all the major features including auto-completion, syntax highlighting, and navigation to related views.
Last but not least, support for Spring Boot 2 is now available.