The new rewritten plugin can not be downloaded yet (or at least I didn't find it anywhere), so this is what I did to build it from source. You'll need java and ant (including the optional tasks) installed to get this working. The examples are for building on linux, so there might be some differences for other platforms.
First you'll need to checkout the scala and plugin sources from subversion:
You can build scala, or if you already have an up to date scala distribution on your system somewhere, you can also point the plugin build to that existing scala distribution (see build.properties.SAMPLE in the plugin directory).svn co http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk scala svn co http://lampsvn.epfl.ch/svn-repos/scala/plugin plugin
Building scala is as simply as running ant with enough memory (in the scala directory):
The same is true for building the plugin (in the plugin directory):export ANT_OPTS='-Xms512M -Xmx1024M'; ant dist
Now start eclipse and uninstall the existing scala plugin if you happen to have that one installed. To install the new plugin, you can create a new local update site and point it to the dist/scala.update directory in the plugin directory you've just built.export ANT_OPTS='-Xms512M -Xmx1024M'; ant dist
To get existing scala projects to work with the new plugin, you have to modify the .project files a bit. This is an example:
That's all. Now you've got code completion in scala ;-)<?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>myproject</name> <comment></comment> <projects> </projects> <buildSpec> <buildCommand> <name>scala.plugin.scalabuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>scala.plugin.scalanature</nature> <nature>org.eclipse.jdt.core.javanature</nature> </natures> </projectDescription>
1 comment:
Thanks a lot. Maybe you could add this information also to the plugin's new wiki page at http://scala.sygneca.com/doku.php
Post a Comment