Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Intellij IDEA 2017.2 EAP Is Here

DZone's Guide to

Intellij IDEA 2017.2 EAP Is Here

It won't be done until after of summer, you but this graphical preview dives into what the next version of IntelliJ IDEA will bring to Java, Spring, and JavaScript users.

· Java Zone ·
Free Resource

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.

Java

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

Dedicated coding assistance is provided for Parameterized Tests 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.

Similar coding assistance has been introduced for Method Handlers and Variable Handlers.

IntelliJ IDEA provides code completion for method and field names as well as their signatures.

idea_2017_2_handlers_2

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.

User Interface

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

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.

JavaScript

Detecting Recursive Calls

If you have a recursive call inside a JavaScript or TypeSCript function, IntelliJ IDEA will detect it and mark it on the gutter, making your code easier to read and understand.

TypeScript: Parameter Hints

The Parameter Hints option which was added earlier for Java, is now available for TypeScript, too.

Code Rearranging

The Rearrange Code action (earlier available for Java and several other languages), is now available for JavaScript and TypeScript. The arrangement rules can be changed in Settings | Editor | Code Style | JavaScript (or TypeScript) | Arrangement.

That’s it for now. To give these and other new features a try, grab the EAP build from our website, or install it via the Toolbox App.

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.

Get the Java IDE that understands code & makes developing enjoyable. Level up your code with IntelliJ IDEA. Download the free trial.

Topics:
java ,intellij idea ,gradle ,refactoring

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}