Mostly when I’m writing code I’m in the Scala IDE for Eclipse, with
a separate terminal window containing SBT running
jetty-run. But flipping back and forth between terminal and Eclipse is
non-optimal, so I went digging for Eclipse + SBT integrations.
There are a few mentioned on the SBT site, but I realized all I needed was a shell prompt as a view in Eclipse and I’d be happy. And of course it exists already as “Target Management Terminal”, part of the Galileo update site.
- Eclipse > Install New Software….
- From “Work with:” select Galileo (or whatever’s appropriate for your version of Eclipse).
- Type “terminal” in the search box, and select Target Management Terminal.
- Go through the download, restart process.
- Eclipse > Preferences and search for Terminal if you want to invert the colours (I did).
- Window > Show View > Other and select Terminal to show the Terminal view in Eclipse.
- Click the green connect button and set up the type of terminal you want (ssh to localhost in my case, and I’m prompted for a password).
- Login, you have a shell, do what you want, such as cd into your project and run SBT.
Probably totally obvious, but I missed this trick of having access to a shell from Eclipse.