What’s New in IntelliJ IDEA 2017.3 EAP?

Last week we announced the opening of the EAP for IntelliJ IDEA 2017.3, the upcoming IDE update which will be released this fall. In the announcement we briefly mentioned some of the major changes the update will deliver. Let’s talk about them in a bit more detail.

Java

First of all, we continue enhancing our data flow analysis for Java code.

IntelliJ IDEA 2017.3 now detects possible nullability issues even in Stream API call chains:

The quick-fixes that help migrate plain for loops to Stream API have been extended to cover a few more sophisticated but quite common cases.

Usages of StringBuilder can now be replaced with Stream.collect and Collectors.joining:

Code that iterates to find a maximum or a minimum can now be automatically replaced with Stream.max and Stream.min:

The data flow analysis for the Optional type has also become smarter:

Now, it reports even non-obvious issues:

We’ve improved the way nullability annotations are inferred. Earlier annotations were inferred only for library methods’ parameters and for any methods’ return types. Now it also infers nullability annotations for parameters of sealed and private methods:

The IDE shows the inferred annotations in Parameter Info and Quick Doc popups. When the caret is at such a parameter, the IDE offers a quick-fix to explicitly declare the inferred annotation:

Finally, there are many brand new inspections, which you can easily see in Settings by typing “2017.3” in the Search field:

JVM debugger

Just like data flow analysis, the Debugger is another area we’ve constantly been enhancing in recent releases, and IntelliJ IDEA 2017.3 is no exception.

First, the Debugger tool window adds a new Overhead tab:

As its name suggests, this tab shows you the overhead added either when stepping over the code or when Data Renderers evaluates values to display them in Variables, Watches, or other places.

When not needed, the tab can be easily hidden and restored later.

Speaking of possible overhead, the Debugger now lets you reduce it – by using the On-demand Data Renderers. Now evaluation of values in Variables, Watches, or other places can be done on click when needed, rather than automatically.

This new feature can be enabled in the Data Renderers settings for each renderer:

Then, in Variables, Watches, and other places, simply click the renderer’s expression placeholder to see the value:

Any renderer can be “muted” from the context menu: this will enable the On-demand setting for the selected renderer:

Same functionality is automatically enabled for any object if you disable the default toString renderer.

Spring

Support for Spring and Spring Boot is also getting better with each update. First of all, we’ve introduced initial support for auto-configured MVC web applications, already available in the EAP.

Another thing related to Spring, and project configuration in particular, is auto-detection of Spring facet and context. We hope this will make your life much easier, since facet configuration is always a painful process required to have Spring-dedicated coding assistance.

Git

In Git integration, we’ve sped up branch operations (especially for large projects) and added slight UX improvements, such as the Interactively Rebase from Here action in the Log viewer. In addition, Compact References View and Show Tag Names settings are now project-level instead of global.

Tools

The biggest highlight here is the brand new editor-based REST client. This new client reuses the approach from VS Code and Emacs for testing HTTP requests:

To use the new client, simply open a new Scratch File and select ‘HTTP Requests’ as its type. This will create a scratch file with the “.http” extension. The file format is basically a mixture of HTTP RFC and custom injections, similar to what VS Code uses.

To run a request, use the icon on the left-hand panel of the editor:

Once the IDE has run a request, it will embed a link with the results to the file for easier navigation:

In other news, the Docker plugin now supports alternative names for docker-compose.yml files.

JavaScript

Support for Vue.js has gotten a lot better with the update, adding automatic closing of curly braces, and coding assistance for props (including props as arrays) and data properties/methods.

The Change Signature refactoring now also works better for ES6 methods: the IDE correctly updates all usages of the method across the project.

The Extract Parameter refactoring now uses the ES6 parameter syntax. Speaking of ES6, when possible, import statements are now added automatically when code is pasted from the clipboard.

The TypeScript support additions include the Extract Type Alias refactoring and

Convert type to interface intention. Also, the TypeScript compiler can now be used by the IDE to report problems in JavaScript (this requires you to set allowJs to true in tsconfig.json).

Finally, code styles are now imported automatically from ESLint and TSLint when a project is opened.

Miscellaneous

One more notable change in this update is the new code style settings format. Now all code style settings are located under “<PROJECT_ROOT>.idea/codeStyle” directory. The ultimate intention is to support multiple project code styles linked to different scopes. The new format is also cleaner and contains all code style settings properly grouped by language.

The old “.idea/codeStyleSettings.xml” is imported to two new files: “.idea/codeStyles/codeStyleConfig.xml” containing a link to preferred project code style, and “.idea/codeStyles/Project.xml” with code style settings for different languages. The latter is optional and created only if there are non-default settings. If the “.idea” directory is under version control, both files can be added to VCS too. The old codeStyleSettings.xml is kept for backwards compatibility.

Last but not least, the Go to File action now doesn’t require slashes between folder names and before the file name:

That’s it for today. To try these new features, download the EAP build from the EAP page on our website, or even better, from Toolbox App.

Since this is an early build, things sometimes may not work as expected. If you come across anything that doesn’t work like it’s supposed to, let us know in our issue tracker.

Happy developing!

About Andrey Cheptsov

Part-time dreamer. JVM/JavaScript geek. IntelliJIDEA Marketing Manager at JetBrains.
This entry was posted in EAP Releases, New Features and tagged , . Bookmark the permalink.

15 Responses to What’s New in IntelliJ IDEA 2017.3 EAP?

  1. David Zemon says:

    Anybody else notice infinite indexing? My project has been indexing all night long. Ubuntu 17.04, 64-bit Intel. Trying to index this project: https://github.com/DavidZemon/LearnSpring

  2. Mike says:

    Can the .http files be saved permanently instead of being a scratch file? The biggest problem with the current rest tester is you can’t save requests for future use. If the new functionality uses scratch files then they can’t be reused and what is the point?

  3. Gerard says:

    Will the REST client also get the code-generation capabilities of the VSCode extension?

  4. B says:

    David, yes, the indexing issue was raised as a bug in clion two years ago. It’s especially apparent on network drives

  5. Malek Boubakri says:

    Any news for YARN Support!?

  6. Jacob says:

    What version of Android Studio will you include/merge into 2017.3 EAP? Have you done that already? I’m specifically interested in a bug fix (https://issuetracker.google.com/issues/37137335) released in Android Studio 2.3.1, that will probably make ‘Instant Run’ work for me in 2017.2.4 (I’m using revision 2.3.3 of the Android plugin for Gradle and version 4.1 of the Gradle wrapper). Thanks!

  7. Mathieu says:

    Just switched from 2017.2.4 to 2017.3 EAP, when running gradle run config it runs in the “Build” view where runs is listed in a dropdown instead of tabs (as it was previously handled in the “Run” view).
    My main issue is that this runs dropdown lists everything without a state displayed so when you run multiple commands, you don’t know anymore what’s running or not. do I lack a configuration?

  8. Honza says:

    A small typo: in the example “Usages of StringBuilder can now be replaced with Stream.collect and Collectors.joining” you use “]” as a suffix AS WELL as a prefix. So the result will be (in both the cases – Stringbuilder and Collectors.joining) something like “]first,second,third]”.

    • Trisha Gee says:

      It’s true, and it’s unusual but it’s not necessarily incorrect :) An example with non-identical prefix and suffix may have shown the feature more clearly. Thanks for paying attention though, and clarifying what the code does.

  9. Anton Triputen says:

    Sorry, I’m new to java so my question can be stupid, but why StringBuilder from example works like this?
    https://photos.app.goo.gl/XBNBAYP3ooaE58VS2
    https://photos.app.goo.gl/LBYM9st31cYaOg0R2

  10. Yoav Vainrich says:

    Where did the “Node.js Remote Debug” configuration go?
    I can’t find it.
    Also, a project that had it already configured, lost this configuration.

    Is there an alternative/workaround?

Leave a Reply

Your email address will not be published. Required fields are marked *