Question

There is an implicit parameter menu item in IntelliJ as shown below.

What is it good for ?

How can I use it ?

I tried to press SHIFT-COMMAND-P on parts of the code where implicits are used and nothing happened.

enter image description here

Was it helpful?

Solution

Using Intellij 13.1:

I didn't notice this feature before (thanks :)), but I've just tested it and I can confirm that Implicit Parameters reveals the implicit parameters used in a method call while the cursor is placed onto it.

enter image description here

In my sample, I put the cursor on the outermost wrapping method call, my Ok call, and it shows it needs (and uses) an implicit parameter: a Writeable[JSValue].

Also, when the cursor is placed on a nested method call, like in the following Json.json call, a quick use of Implicit parameters feature makes IntelliJ suggest you which method to scan for implicit calls up to the outermost wrapping method (Ok in this case):

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top