Akka in Eclipse on Mac OS
These are my rough notes for getting Akka HEAD going in Eclipse with the Scala plugin. I used a nightly build of the plugin to get support for a recent version of Scala.
Fork the Akka repository.
Make a local clone of your fork.
git clone git@github.com:richdougherty/akka.git akka
Build it and run tests.
$ sbt test
Create an
~/.sbt/plugins/plugins.sbt
file to teach SBT about the sbteclipse plugin.addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.1.0")
Generate Eclipse project metadata.
$ sbt eclipse
Download Eclipse Indigo SR2 and install it somewhere. Do not run it yet.
Find the Eclipse application and view its contents by right-clicking and choosing Show package contents.
Update
Contents/MacOS/eclipse.ini
according to these instructions. OK, I used a bit more memory. My changes were:$ diff -u Eclipse.app/Contents/MacOS/eclipse.ini Eclipse\ retinafied.app/Contents/MacOS/eclipse.ini --- Eclipse.app/Contents/MacOS/eclipse.ini 2012-11-26 13:48:13.000000000 +0100 +++ Eclipse retinafied.app/Contents/MacOS/eclipse.ini 2012-11-26 14:00:45.000000000 +0100 @@ -16,9 +16,11 @@ -Dosgi.requiredJavaVersion=1.5 -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts --XX:MaxPermSize=256m --Xms40m --Xmx384m +-XX:PermSize=256M +-XX:MaxPermSize=512M +-Xms512m +-Xmx1280m -Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts +-XX:+UseParallelGC
I have a high-res (Retina) screen on my Mac so I enabled high-resolution fonts for the Eclipse application according to these instructions.
Update
Contents/MacOS/eclipse.ini
according to these instructions. If you’ve already started the application then your changes might not be picked up because of OS caching. Read the linked instructions for a workaround. My changes were:$ diff -u Eclipse.app/Contents/Info.plist Eclipse\ retinafied.app/Contents/Info.plist --- Eclipse.app/Contents/Info.plist 2012-11-26 13:34:45.000000000 +0100 +++ Eclipse retinafied.app/Contents/Info.plist 2012-11-27 11:40:36.000000000 +0100 @@ -69,9 +69,6 @@ --> </array> - <key>NSHighResolutionCapable</key> - <true/> - </dict> </plist>
Open Eclipse.
Tell Eclipse how to get the 2.10.x nightly build of the Scala plugin. Go to Help and choose Install New Software…. The update site is located at
http://download.scala-ide.org/nightly-update-master-trunk
. There are also milestone builds available.Go to General and Workspace and set the Text file encoding to UTF-8. Otherwise you’ll get funny errors when Scala tries to compile the ⇒ characters in Akka source code.
Use Import Existing Projects into Workspace… to pull in the Akka source code.
Done!
Update: Explained how to add Scala plugin. Oops!