Quick Fixes updated

Quick Fix Import

Quick Fix can be used to easily add a required import statement.


Expand Implicit Conversion


Implicit Highlighting needs to be enabled.

Quick Fix can be used to expand an implicit conversion.


Create Method and Class new

For the following code snippet there exists a quick fix for the method call of g:


The result of applying this quick fix is the following:

object Test extends App {

  def f() {
    val value = g("a string")

  def g(arg: String) = {

As one can see in the screenshot above it is also possible to create classes, not only methods.

Change Capitalization new

If one did a type error in the name of a method, it is possible to correct this as long as the only type error is due to wrong capitalization:


Add Explicit Type new

If you want to add an explicit type to a method or a value definition, you can automatically add the inferred type. Position the cursor on the value or method definition and type Ctrl-1 (or CMD for Macs). You should see a popup offering to add the explicit type, like the in the picture below: