Scala 1.5 EAP: Coding Assistance for Interpolated Strings, New Inspections and Better SBT Support

If you’re using the EAP update channel, you might’ve noticed a new version of the  Scala plugin available. In addition to a bunch of bugfixes inside the new update you’ll also find a few nice new features.

Coding assistance for interpolated strings

Interpolated strings is a great feature of the Scala language. Better coding assistance for writing those interpolated strings is a new feature of IntelliJ IDEA. Now it’s possible to quickly turn a string to an interpolated string simply by adding a variable reference. Notice  that the IDE will take care of adding brackets:

scala_interpolated_string_completion

We hope this additional coding assistance will save you some time.

New inspections for Scala Collections

Inspections help you spot potential problems in your code and find the code that smells. This is why we never stop adding new inspections: this time we’ve added several more that will ensure you treat Scala Collections properly:

scala_collections_inspections

SBT project auto-import

The SBT project auto-import (when enabled) has been triggered by any change in your SBT files, even if you just pressed a single keystroke. In our latest update we’ve changed it so the auto-import is now triggered only when your changes are physically saved (usually on frame deactivation).

We hope you’ll find all these changes useful. Please share your feedback on our discussion forum and submit found issues directly to the tracker.

To give this EAP update a try, just go to Settings (Preferences for OS X) → Languages & Frameworks → Scala → Updates → Plugin update channel, switch the EAP channel, and update the plugin.

 Develop with Pleasure!

Posted in EAP, New Features | Tagged , | 3 Comments

What to Check Out in Scala Plugin 1.4.x for IntelliJ IDEA 14 & 14.1

If you’ve already upgraded to IntelliJ IDEA 14.1 (released just a few days ago), you might’ve noticed (in addition to all of its awesome new features), a new Scala plugin update: v1.4.15.

The update brings you quite a few improvements for the Play framework support: fixed problems with running of the applications, and better yet, JavaScript injection to Play templates. 1.4.15 is the first of the planned series of Scala plugin updates that will be available exclusively for IntelliJ IDEA 14.1, because at this moment IntelliJ IDEA 14 only receives bug fixes, whereas the new feature development is entirely focused on 14.1. This also means more new features and improvements are on the way for it, so getting the 14.1 is a good idea (if you haven’t done this already.)

Now that I’ve already got your attention, I’d also like to review what’s exactly new in this Scala plugin version (in case you haven’t followed the EAP news.)

Continue reading

Posted in Uncategorized | Tagged , , , , | 29 Comments

Scala 1.4 EAP Brings Advanced Implicits Analyzer and Faster Play Compiler

We’re working on our next update for the Scala plugin, and today I want to share with you a fresh EAP build that brings two noticeable improvements: advanced analysis for implicit parameters and faster compilation for Play Framework.

Advanced Implicit Parameters Analyser

Now, when you call the Implicit Parameters action, in addition to the list of applicable implicit parameters you will see those that can’t be found:

Screen Shot 2015-03-02 at 20.20.51

Under the “Parameter not found” label you’ll find the list of possible implicits for this location. It distinguishes the following cases:

  • Fewer applicable implicits are found
  • Somewhere deep an implicit is not found or diverging
  • No applicable implicits found for this parameter

Compiler Server for Play Framework

Another improvement makes the compilation for Play applications blazingly fast, thanks to moving it to a separate process. Now every time we compile the project we don’t have to start SBT.

For the complete list of changes refer to Release Notes.

We hope you’ll find these changes useful. Don’t forget to write us back on our discussion forum or report any found bugs directly to the tracker.

In case you’d like to give a preview build a try, but don’t know how, switch to the EAP update channel via Settings (Preferences for OS X) → Languages & Frameworks → Scala → Updates → Plugin update channel.

 Develop with Pleasure!

Posted in EAP, New Features | Tagged , , | 7 Comments

Scala Plugin 1.3.3 RC is Available

With IntelliJ IDEA 14.1 EAP that has started earlier this week, we now have Scala plugin EAP available for both versions of this IDE.

As Scala plugin 1.3 proved to contain some performance problems, today we are releasing Scala plugin 1.3.3 RC, a preview build with the corresponding fixes. One more important change in this build is the option to rollback to the old implicit search algorithm via Settings/Preferences → Languages & Frameworks → Scala → Use old implicit conversion search algorithm. Use this option only if you encounter red code or performance problems. In this case please do report these issues to our tracker. This will help us safely migrate to the proper new  algorithm.

Develop with Pleasure!

Posted in EAP | Tagged , | 9 Comments

Scala Plugin 1.3 is Available for IntelliJ IDEA 14.0.3

We’ve just released Scala Plugin 1.3! If you haven’t been following the recent EAP, here’s what this new update has to offer:

  • Debugger improvements
    • Variables from the outer scopes are visible in the Variables tab now: there is no need to evaluate expressions or step through frames anymore.
    • Step into action now works in a more natural way for lambda expressions, methods implemented in traits, default arguments, specialization methods, etc.
  • Support for Monocle
  • Unused imports inspections are now aware about the implicit parameters in the implicit conversions for extension methods
  • Possibility to have custom compiler settings for different modules
  • Fixed requirement of Invalidate Caches to get rid of weird error highlighting in project
  • Fixed Specs2 3.M1 support
  • Automake with enabled compiler server is working now
  • SBT shared source roots support for ScalaJS projects (see SCL-7859)

Find the complete list of changes in the Release Notes.

Note that to use Scala Plugin 1.3, you need the most recent version of IntelliJ IDEA (IntelliJ IDEA 14.0.3).

Don’t forget to share your feedback with us in the discussion forum and the issue tracker.

Develop with Pleasure!

Posted in Release report | Tagged , , , | 10 Comments

Scala Plugin 1.3 RC is Available

You’ll be glad to know that we’ve just released a fresh RC build for the upcoming Scala plugin update. This build fixes the recently introduced performance regression and brings several other bugfixes and enhancements.

Be sure to give the new build a try and share your feedback with us in our discussion forum and issue tracker.

Posted in EAP | 2 Comments

Scala Plugin 1.3 EAP 1.2.67 is Available

You’ll be glad to know that a fresh EAP build for Scala Plugin 1.3 is already available, and it brings a lot of improvements:

  • Monocle support
  • Unused imports inspections are now aware about the implicit parameters in the implicit conversions for extension methods
  • Fixed requirement of Invalidate Caches to get rid of weird error highlighting in project.
  • Fixed Specs2 3.M1 support
  • Automake with enabled compiler server is working now
  • Possibility to have custom compiler settings for different modules
  • SBT shared source roots support for ScalaJS projects (see SCL-7859)

We hope these improvements will make your life easier. Be sure to give the new build a try and share your feedback with us in our discussion forum and issue tracker.

For the complete list of changes, refer to Release Notes.

Posted in EAP, New Features | 5 Comments

Scala Plugin 1.3 EAP Brings Better Debugger

You’ll be pleased to know that our new Scala Plugin 1.3 EAP build brings several small but quite important improvements to the debugger:

  • The variables from outer scopes are visible in the Variables tab now: there is no need to evaluate expressions or step through frames anymore.
  • Stepping into now works in a more natural way for lambda expressions, methods implemented in traits, default arguments, specialization methods, etc.

We hope these improvements will make your life easier. Be sure to give the new build a try and share your feedback with us in our discussion forum and issue tracker.

For the complete list of changes, refer to Release Notes.

Develop with Pleasure!

Posted in EAP, New Features | Tagged , | 3 Comments

Scala Plugin 1.2 is Available

Winter is coming, and we brace ourselves with the new features for Scala developers, so check out the new Scala Plugin 1.2 for IntelliJ IDEA 14 (if you haven’t done so yet.)

One of the notable improvements it brings is the Ahead-of-time Code Completion, a brand new type of code completion that suggests variable and parameter names along with their types based on the classes available in a context:

More details on how this works can be found in the corresponding EAP announcement.

Another important thing is that you can now switch between EAP (Early Access Program) and Release update channels via an option in the Settings → Languages & Frameworks →  Scala → Misc:

For the complete list of changes see Release Notes.

We hope you’ll enjoy the new features, and as always are waiting for your feedback in the discussion forum and the issue tracker.

Develop with Pleasure!

Posted in New Features, Release report | Tagged , , | 6 Comments

Scala Plugin 1.2 RC Introduces Ahead-of-time Code Completion

With the just published Scala Plugin 1.2 RC build, we’re happy to pioneer a new kind of coding assistance, which we like to call “ahead of time” (AOT) code completion.

Have you ever noticed that unlike Java, in Scala we have to spend more time actually typing all the parameter and variable names? In Java we can always do this:

  1. automatically complete a type reference,
  2. then automatically complete a corresponding parameter or variable name.

Which is very quick and really convenient. Unfortunately, this won’t do in Scala directly because of these reasons:

  • order of variable type and name is reversed and,
  • type annotation is optional and therefore may never exist.

So everyone programming Scala was completely denied all of this completion coolness… until now. We’ve changed the rules: now it’s possible to automatically complete both the name and the type before actually adding a type reference (and that is why we call it “ahead of time” completion):

scala_aot_completion_1

Basically, for class and method parameters you can imagine that autocomplete is invoked one step further, on the type reference, with a search string capitalized, so that:

  • you can start autocomplete either via “auto-popup”, or manually, by pressing Ctrl + Space,
  • you may press Ctrl + Space one more time, to broaden the scope of search,
  • it’s possible to start a search from the middle of type name (“element” for “element: PsiElement”),
  • it’s possible to use CamelHumps (“mEve” for “mouseEvent: MouseEvent”),
  • the type reference is automatically imported, if needed.

As for values and variables, we’ve modified the described algorithm so that no type annotation is inserted (only the name part is completed), and the search scope is reduced to explicitly imported classes:

scala_aot_completion_2

This algorithm is still work in progress, so the current restrictions may be loosened after we get more intel from people who are actually using it.

The current implementation is available in Scala Plugin 1.2 RC. You may toggle the AOT completion via Settings / Scala / Core page.

So, now we can develop with even more pleasure, and we hope that other languages (yo Kotlin!) and IDEs will follow. Your suggestions are welcome!

Posted in EAP, New Features | Tagged , | 8 Comments