IntelliJ IDEA 2016.3 RC: Scala.Js, Scala.Meta and More

Though we’ve been silent for quite a while recently, it doesn’t mean we’ve not been busy, so today we’re presenting the new features for Scala plugin RC for IntelliJ IDEA 2016.3 that we’ve just created.

Scala.js

First of all, in this update we’ve added a better support for js.Dynamic:

Now it provides code completion and quick navigation to fields and methods defined in the project.

The coding assistance works regardless to where fields and methods are defined–in libraries or in project files:

The resolve mechanism for js.Dynamic works in the same manner as for JavaScript and complies with the settings defined for the project in Settings → Language & Frameworks → JavaScript.

Note, that the Scala.js support is a part of Ultimate.

Scala.meta

Another major plugin improvement is the support for scala.meta–the new metaprogramming toolkit designed to succeed scala.reflect. IntelliJ IDEA supports new-style macro annotations and provides coding assistance for scala.meta quasiquotes.

The new plugin version brings you gutter icons for scala.meta macro annotations. Clicking these icons expands the corresponding annotations. IntelliJ IDEA automatically detects when annotations change and prompts you to recompile them via the gutter icon (or the standard Recompile action.)

If there’s an error in an annotation (or it just doesn’t match the target), IntelliJ IDEA will inform you about it:

In other news, the update brings a great number of other improvements, for example, better responsiveness during long heavy operations.

Also, you’ll see less of “red code”, for example when you’re using akka-http:

Last, but not least, we’re working on the new “Migrators API” that will allow library authors to tell IntelliJ based IDE how migration of projects that are using different library versions should occur. This will allow to automatically migrate code, replace certain APIs, and so on. More details on this API are coming soon. The plugin uses this API itself for providing migration of code to Scala 2.12, e.g. replacing with SAM. Available migrators can be enabled via Settings → Language & Frameworks → Scala → Migrators.

And remember: switching your Scala plugin to the EAP channel can be performed in Settings → Language & Frameworks → Scala → Updates:

We are using Intellij to develop an application with AKKA. But if we add in the Intellij the Scala plugin then some methods as(isPresent(), get()) for some objects are no longer available. This is due to the scala interpreter takes over the java interpreter from the akka framework so it generates an error.