There is currently a severe REPL limitation:
scala> import concurrent._
import concurrent._
scala> Fut<tab>
This doesn't complete to Future
. In other words, wildcard imports are not understood by the JLineCompletion
.
I am trying to work around this. I am able to find the ImportHandler
instances which report importsWildcard == true
, but they are otherwise empty except for the plain importString
(e.g., "import concurrent._"
).
How do I get a list of these wildcard imports, so I can fix the completion candidates?
One idea is as follows: I can get the completions for concurrent.<tab>
, so somehow there must be already the functionality to look up the members of a package via the IMain
instance.
This problem doesn't affect current versions of Scala. I tried the sbt console with Scala 2.12.4, and tab completion works with wildcard imports. (Beware of this problem, through).