Is there a way to import packages from your current project into a worksheet
Question
I like worksheets as an alternative to the REPL, but I keep implementing functions in the worksheet and then copying them back into the actual project. How do I import a package from the current project so that I can call those functions in the worksheet?
Solution
There is nothing special to do. Just do regular import of the packages you need in the worksheet. For instance:
import com.acme.myproject._
The worksheet is a totally regular source file, that simply gets evaluated in a fancy manner on save.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow