scala - Code completion of not-imported "pimps" in IntelliJ IDEA -
is possible in current intellij idea (12) enable code completion of "pimps" (implicit def , implicit class stuff, similar extension methods c#) not in current scope = no import statement in current file contains them.
what i'd want similar not-imported class/trait/object behaviour - ide underlines , asks if want add import statement it. best if "pimped" methods/operator shown in code completion list, module (or other) scope , ide add (or ask include) imports automatically when new method/operator used.
can achieved either changing settings or using plugin?
edit1: sample code
pimps.scala
object pimps { implicit class stringpimps(s: string) { def mymethod = s"** $s **" } }
main.scala
import pimps._ // without import object main extends app { println("xxx".mymethod) // ide won't suggest "mymethod" }
yes, use alt-ctrl-space
, suggests non-imported implicits too.
Comments
Post a Comment