Evaluate Expression feature for Scala

Evaluate expression feature is available now in build 0.5.180.

This feature is not fully implemented (and will not be in foreseeable future) and have beta quality, however even now it’s much more usable than it was using Java language.

Supported features:

  • Scala editor with debug context resolve/completion.
  • Add import action.
  • Conditional breakpoints.
  • Local variables evaluation, even from inner functions/classes (you don’t need to use $ anymore).
  • Local function calls.
  • Implicit conversions.
  • Default, named, implicit parameters for method calls.
  • New instance creation.
  • Boxing/unboxing of primitive values.
  • Primitive values calculations.
  • While/do/if statements.
  • Assign statements.

Unsupported features:

  • Pattern matching local value with one usage (It’s probably will be done).
  • Anonymous classes (It’s will not be done as in Java Evaluate Expression)
  • Anonymous functions (the same as for classes, however It’s slightly simpler than for classes, so unlikely, that it will be done, but it’s possible)
  • By-name parameters (it’s anonymous function, however It’s probably will be done)
  • Default, named, implicit parameters for constructors.
  • Pattern matching.
  • Variables/function declarations.
  • Dynamic method calls (I’m sure it will be fixed soon)

Look at this feature in action:

Is it possible using Java?

Comments below can no longer be edited.

4 Responses to Evaluate Expression feature for Scala

  1. Avatar

    Kieron Wilkinson says:

    November 14, 2011

    Fantastic work!

    I’m sure I will miss anonymous functions as I get used to it though. 😉

  2. Avatar

    OlegYch says:

    November 14, 2011

    Thank you! This is very cool.
    Although I must admit that without support for at least anonymous functions it is severely capped.

  3. Avatar

    Maurício Linhares says:

    November 15, 2011

    That’s awesome, keep up the good work, this Scala plugin makes IntelliJ the best tool to develop Scala code by far.

  4. Avatar

    Jagat says:

    April 16, 2014

    2.5 years after this post, and anonymous functions for scala are still not supported. Any update on this front?

Discover more