Intellij IDEA 2017.2 EAP Is Here
Intellij IDEA 2017.2 EAP Is Here
Join the DZone community and get the full member experience.Join For Free
Get the Edge with a Professional Java IDE. 30-day free trial.
It’s been only a month and a half since the release of IntelliJ IDEA 2017.1, but it’s time to shed a light on the next major update, on which we’re going to work the entire Summer.
Better Gradle UX: Progress and Environment Variables
When Gradle is downloading a wrapper distributive, IntelliJ IDEA will display the progress bar in both Console tool window and Background Tasks popup.
When you run a Gradle task via a Run Configuration, you will be able to specify and/or override environment variables.
On macOS, IntelliJ IDEA now respects environment variables defined in the Terminal, which makes its Gradle build consistent with the command line behavior.
Smarter Control Flow Analysis: Number Ranges
Java static code analysis has become smarter and now detects issues impossible to catch without deep control flow analysis. For example, numeric comparisons are checked so that they don’t evaluate to true or false all the time.
Usually, these warnings are found in dead code, but sometimes they might be a sign of deeper issues. In the example, the above highlighted code is not reachable because when the value of the index variable becomes equal to the length of the string, it will have already thrown an IndexOutOfBoundsException.
This analysis is aware of loops, casts, and statements like throw, return, if, or switch.
Refactorings: Extract a Map Operation
When you’re extracting a variable inside a Stream API map call, IntelliJ IDEA offers to extract it as a separate map() expression:
JUnit 5 M4: Parameterized and Repeated Tests
IntelliJ IDEA warns if you haven’t specified the source of arguments for your test.
It also makes sure that the argument values match the method signature.
IntelliJ IDEA reports suspicious use of both Test and ParameterizedTest annotations together:
Now you get completion and navigation for method names used with MethodSource. IntelliJ IDEA won’t report a method as unused if it has usages in tests with MethodSource.
Reflection API: Coding Assistance
The coding assistance for Reflection has been improved.
IntelliJ IDEA provides code completion for method and field names as well as their signatures.
If a name refers to a non-existing method, or field, you’ll get a warning.
Same happens when a handler is invoked with wrong parameters.
Find in Path: Gutter Icons, Local Change Markers, Focus
The Preview panel in Find in Path now has a Gutter where you can see the navigation icons and local change markers.
And, it won’t just disappear when you switch focus away from IntelliJ IDEA, so to close it you have to press Esc.
Better HiDPI Support: Per-Monitor, Auto-Adjusted Font Sizes
Earlier, on Windows and Linux IntelliJ IDEA would scale its UI according to the global settings (primary display), which meant that one scale factor was used across all displays. Right now, on Windows, each of the displays gets its own scale factor (provided it’s an integer value), and support for Linux and fractional values is coming.
Font settings are automatically adjusted based on the display resolution.
Spring Boot: Actuator Endpoints
The Run/Debug tool windows for Spring Boot applications now have a tab called Endpoints, where you can see the information about the Health and Beans endpoints.
The support for other endpoints (e.g. mapping) is coming soon.
Detecting Recursive Calls
TypeScript: Parameter Hints
The Parameter Hints option which was added earlier for Java, is now available for TypeScript, too.
Since the new version is under heavy development, we’d appreciate any feedback. Please submit bug reports as well as feature requests or simply improvement suggestions to our issue tracker.
Known issue: The users of macOS 10.12.4 (or earlier) may experience a significant performance slowdown because of the accessibility issues in the JRE. The issue may be caused by some third-party accessibility applications utilizing A11Y, e.g. Magnet. As a workaround, it’s recommended to disable the application in System Preferences | Security & Privacy | Accessibility. We’re working on fixing this issue.
Published at DZone with permission of Andrey Cheptsov , DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.