Is there a way to import packages from your current project into a worksheet

scala, scala-ide

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.

Problem

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?

Original source