Early Access Program Features

IntelliJ IDEA 2017.1 Public Preview: Java 9, Debugger, VCS, Search, Editor and Many More

It’s been three months since we released v2016.3. Roughly half of this time we spent working on bug-fixes; some fixes made it to minor updates, others will go into v2017.1, and others are planned for further releases. The other half was used to enhance the existing functionality and extend it with new features. Today we’d like to give you a glimpse of the most notable changes coming in v2017.1 planned to release this spring. Please welcome IntelliJ IDEA 2017.1 Public Preview – an EAP build where you can try most of the upcoming enhancements.

IntelliJIDEA_20171_PublicPreview@2x_img

Java 9

First of all, the preview brings the promised support for Java 9 and mainly the new module system. The IDE supports the latest versions of JDK 9, helps import projects, and offers coding assistance when editing module declarations:

A built-in inspection validates module declarations and provides a quick-fix to adjust the project dependencies accordingly when necessary:

idea_2017_1_java_9_2

If you decide to try Java 9 with IntelliJ IDEA, make sure you use the latest JDK. To learn more about the new module system, check out the official tutorial.

Java 8

While working on Java 9 support, we keep improving our coding assistance around Java 8. The quick-fixes introduced earlier, which help migrate for loops to Stream API calls, have been improved and now support more complicated cases. We’ve also introduced a quick-fix that can migrate Stream API calls back into for loops. This can help you debug your code or simply make it easier to understand:

idea_replace_stream_with_loop

When possible, the IDE suggests replacing Map.put statements and updating a value associated with a given key with a call of Map.merge:

idea_2017_1_merge

Also, the IDE suggests replacing certain Map operations with Map.getOrDefault:

idea_2017_1_get_or_default

If you’re still transitioning to Java 8, make sure to watch the recording of our webinar “Refactoring to Java 8” from last week. In it, Trisha not only talks about how IntelliJ IDEA helps refactor to Java 8 but also explains the pros and cons of migrating to new APIs.

JVM debugger

The JVM debugger adds two improvements that make asynchronous code easier to debug.

The new feature called Async stacktraces alters the stacktrace by substituting its parts related to asynchronous code execution with the corresponding parts of the stacktrace captured from where the asynchronous code is passed:

idea_2017_1_capture_captured_stack

This way, instead of ForkJoinPool.runWorker (executor service that runs code asynchronously) and all of its internals, we see the place where we invoke CompletableFuture.supplyAsync (S2_Creating.supplyAsync).

This is how it looks if you filter out the library frames (by clicking the Filter button):

idea_2017_1_capture_captured_stack_filtered

The Smart Step Into action now also supports asynchronous code and steps into lambda expressions executed on other threads:

idea_2017_1_step_into_lambda_expression

In addition to the improvements around asynchronous code, we’ve rewritten method breakpoints to make them much faster (they used to significantly affect application performance); and added a new way to remove breakpoints. The latter allows you to drag and drop breakpoints to remove them. Once you enable it, simply clicking a breakpoint – instead of removing it – will enable/disable it. This mode may save you from accidentally removing a breakpoint and losing its parameters such as a condition.

Version control

The Log viewer for Git and Mercurial has been extended with more display options.

Now you can choose whether you want to use regular expressions and case sensitivity when searching over commit messages:

idea_2017_1_vcs_search_text

Also, you can choose how much information about branches and tags the Log viewer displays:

idea_2017_1_vcs_settings

The Diff dialog got a new option called Ignore imports and formatting. As its name says, it ignores changes within import statements and whitespaces (at the same time it respects whitespaces within String literals):

idea_2017_1_ignore_imports_and_formatting

Finally, the File History feature for Git has become faster. Besides better performance, it now can display the revisions graph, and even has a button to include changes from branches other than the current:

idea_2017_git_file_history

We’ve also redesigned the Branches popup for Git (for Mercurial it’s coming soon).

Now you can mark any branch as a favorite, for easier access:

idea_2017_git_branches_1

The new popup also provides better search:

idea_2017_git_branches_2

Search

The Find in Path dialog, which had received a Preview tab earlier, has been reworked from the ground up and now shows instant results in the first place.

idea_2017_find_in_path

What is more important, now you can open any selected result in the Editor simply by pressing Enter. To see results in the tool window, either click the button at the bottom or press Ctrl+Enter (Cmd+Enter for Mac OS X).

Editor

The editor now supports Unicode emoji characters (which are sometimes used in comments and String literals). On Mac OS X, emoji characters are rendered as colored images, while on Windows and Linux, emoji are rendered as monochrome characters.

idea_2017_1_emoji

Zero-latency typing, introduced previously as an experimental feature to remove possible lags when typing, is now enabled by default.

Spring

Spring frameworks along with Spring Boot have long become the de-facto standard for building server-side applications for the JVM. This update comes with lots of improvements in this area.

Support for Spring Testing has been updated based on the changes introduced with Spring Boot 1.4.3 and the upcoming Spring 5.0.

Support for Spring Data has been also updated following the changes introduced with Spring Data 2.0 (including MongoDB, Redis, KeyValue, Solr, Gemfire, Apache Cassandra, REST, Neo4j, Couchbase, and Elasticsearch).

The improvements include support for many new annotations and types (reactive types), new inspections, code completion, navigation, and other coding assistance features.

idea_2017_1_spring_data_1

The Spring tool window now has a new tab called “Data” to help you quickly navigate through the repositories defined in your project:

idea_2017_1_spring_data_2

The update understands Spring Data Projections and provides coding assistance for working with them.

New inspections may help you validate the correctness of the projections:

idea_2017_1_spring_data_3

For annotations, the IDE will offer code completion that is aware of the projections:

idea_2017_1_spring_data_4

New inspections also help validate the correctness of repository methods (their return types and parameters):

idea_2017_1_spring_data_5

Support for Spring MVC has been updated with coding assistance for path attribute in JSP form tags:

idea_2017_1_spring_mvc_path

Whew, that’s about all the improvements for Spring! We’re going to publish separate blog posts about these and other new features around Spring frameworks.

Kotlin

The Kotlin plugin bundled with this preview has been updated to Kotlin 1.1 RC. If you haven’t been following the news around Kotlin 1.1, this is gonna be a big and important update for the language. Among many other things, it introduces coroutines – the new non-blocking asynchronous APIs, and full support for compilation to JavaScript. The latter means that you can use Kotlin strings, collections, sequences, arrays and other core APIs in your JavaScript apps.

Groovy

This preview brings coding assistance for editing appender configuration. It includes code completion, finding usages, navigation and renaming:

idea_2017_1_grails_logback

The Parameter Hints option, which was added for Java in IntelliJ IDEA 2016.3, is now available for Groovy as well.

Gradle

Support for Composite builds, introduced in v2016.3, has been greatly improved. Now the IDE automatically detects “includeBuild” in Gradle settings and configures the project accordingly. No manual configuration is required.

idea_2017_1_gradle

If you’d like to learn more about Composite builds and their support in IntelliJ IDEA, register for our free live webinar that will take place March 15th.

Also, the preview includes the support for Gradle 3.4. Later this support will be back-ported to 2016.3 as well.

Docker

The updated Docker plugin now supports Docker for Mac and works via “unix://”.

Android

The preview includes all the changes from Android Studio 2.2.2.

JavaScript

The IDE now helps you convert for..in loops on arrays to for..of statements introduced in ECMAScript 6. All you have to do is press Alt+Enter on the loop and select this conversion option. Another new intention can convert iterations with forEach to for..of.

The preview adds first-class support for Vue.js. The IDE not only understands the template, script and style blocks with various lang attributes in the .vue files, but also provides completion for Vue directives and component names.

This update brings lots of new code style options for JavaScript and TypeScript. You can now configure the use of semicolons to terminate statements, trailing commas, quotes type, and wrappings for ternary operators and variable declarations with single var.

The Optimize imports action can now automatically sort JavaScript and TypeScript imports alphabetically by module and reorder the imported members. You can configure this behavior in the Code Style settings.

The Code Style settings now support JavaScript Standard Style. To use it, go to Preferences | Editor | Code style | JavaScript and click ‘Set from Predefined Style – Standard.’

Since Standard is based on ESLint, you can use it via the ESLint integration. If you open a new project and Standard is listed in package.json, the IDE will enable it automatically.

Integrations with ESLint and TSLint now work faster and more reliably, thanks to the updated architecture that makes the IDE communicate with these tools as it does with a language service.

Also, the IDE now lets you apply TSLint-powered fixes through quick-fixes.

Now when you open a new project that uses ESLint, TSLint, JSCS, or Stylelint (has it listed in package.json or has a related config file), error highlighting will be enabled automatically.

Adding new project dependencies to package.json became easier: the IDE now provides code completion for package names.

The IDE also suggests the latest versions of the packages.

Running Mocha tests is even easier now with the new Run icon on the gutter. Click the icon next to the test or the suit name and select Run or Debug.

The test status will be displayed next to the test name for all supported test frameworks.

The Angular plugin has been extended to integrate with the Angular language service, developed by the Angular team to improve code analysis and completion for Angular-TypeScript projects. To enable the service, first run the following in your project root: “npm install @angular/language-service –save-dev”.

More details about the JavaScript and TypeScript improvements in v2017.1 can be found in the WebStorm team’s blog.

Database tools

Notable improvements in the Database tools and SQL support include:

  • Better schema management in the Data Sources and Drivers dialog
  • The Modify Table dialog is now opened by double-cliсking a column
  • Сolumns mapping and DDL preview in CSV import
  • Drag-n-drop for exporting/importing tables
  • More smart options for editing SQL
  • Support for NEW/OLD rows and INSERTED/UPDATED tables when editing triggers
  • Code completion for named parameters of routines on via Ctrl+Space twice
  • Better support for SQLite based on native introspection (with support for triggers, expression indexes, partial indexes and check constraints)
  • The trigger template in the Generate menu
  • The quick info pop-up (Ctrl+J) for PostgreSQL system tables now contains the link to the documentation page at postgresql.org
  • TNS names are correctly parsed from tnsnames.ora file in Oracle. This means that the completion is available in this field of the connection window

Fore more details about these changes, please check out the DataGrip team’s blog.

Windows

The Windows installer now comes with a 64-bit JDK, which means that now you can give your IDE more RAM.

Other

The preview adds better support for Dvorak and some other non-standard (e.g. German, French, Italian, etc.) keyboard layouts. The added support still has some limitations but we’re working to fix them.

You’re very welcome to download IntelliJ IDEA 2017.1 Public Preview right away and try all its new features. We appreciate your feedback as it helps us find and fix more problems before the release goes public. Please send bug reports to our issue tracker, and share your impressions on the discussion forum or in the comments below.

image description