When an implicit conversion is applied, IntelliJ underlines the converted code. Is it possible to navigate to the applied conversion in some way?
To start working with Scala in IntelliJ IDEA you need to download and enable the Scala plugin. If you run IntelliJ IDEA for the first time, you can install the Scala plugin when IntelliJ IDEA suggests downloading featured plugins. Otherwise, you can use the Settings | Plugins page for the installation.
The Scala plugin extends IntelliJ IDEA's toolset with support for Scala, SBT, Scala. js, Hocon, and Play Framework. Support for Scala, SBT and Hocon is available for free in IntelliJ IDEA Community Edition, while support for Play Framework and Scala. js is available only in IntelliJ IDEA Ultimate.
BTW, if you want to find out in IntelliJ, simply click on some class part of the Scala library, it takes you to the definition. Look at the bread crumb below the menu bar. It shows you which file it found it, the file name includes the version number.
Yes it is possible (IntelliJ IDEA 11.1.3 CE with Scala Plug-In 0.5.948, but this has been possible for a while).
You need to select the receiver not the method itself. For instance, assume dataDir
is of type java.io.File
. Then I can do
dataDir.listFiles().foreach( ... )
where foreach
is available through implicit conversion from Array
to ArrayOps
, thus is underlined. If you select dataDir.listFiles()
and choose from the menu Navigate -> Implicit Conversion (shortcut Ctrl-Q
), a popup menu shows you all possible conversions, and selects the conversion currently applied.
As above but the shortcut in Windows/Linux is Ctrl+Shift+Q.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With