The following is an excerpt from Scala IDE
Scala IDE provides support for development of Scala applications in the Eclipse platform.
The main purpose is the support for the Scala language and the integration with the Eclipse Java tools.
It provides many of the features Eclipse users have come to expect including:
Support for mixed Scala/Java projects and any combination of Scala/Java project dependencies. Type driven operations are transparent across Scala and Java files and projects, allowing straightforward references from Scala to Java and vice versa.
A Scala editor with syntax highlighting, inferred type, hyperlinking to definitions, code completion, error and warning markers, indentation, brace matching.
Project and source navigation including Scala support in the Package explorer view with embedded outline, outline view, quick outline, open type, open type hierarchy.
Incremental compilation, application launching with integrated debugger, hyperlinking from stack traces to Scala source, interactive console.
Support for Eclipse plug-in and OSGi development including hyperlinking to Scala source from plugin.xml and manifest files.
The Scala IDE is released under a BSD-like license and community involvement in its development is strongly encouraged.
See the Developer Documentation on how to take part.
The following is a guide to setup Scala IDE for Eclipse.
- Java Development Kit 1.6 or higher
- Eclipse IDE 4.4 (Luna) or 4.5 (Mars)
- Scala IDE – This is currently provides version 2.10 and 2.11 Scala environments (as of 2016-04-04).
- Scala Maven Plugin – Download from the Eclipse Update Site
Add the following to the eclipse.ini to ensure that the Scala IDE has enough memory:
-Xms256m -Xmx2048m -Xss2m -XX:MaxPermSize=256m
Install Scala IDE
The current release of Scala IDE for Eclipse is version 4.4.0 (as of 2016-04-04).
The simplest way to get started is to download a pre-configured version of Eclipse by going to the download page.
To continue using an existing Eclipse installation, the Scala plugin can be installed instead.
Navigate the Eclipse menu Help > Install New Software… and Add the update site.
Maven integration in Eclipse is a separate plugin, but may be installed depending on the Eclipse version.
The default maven plugin does not support Scala out of the box, and the m2eclipse-scala connector must be installed.
This connector understands the Scala maven plugin and links the compile phase to the Eclipse Scala Builder.
Install both plugins by adding the Eclipse the m2eclipse-scala update site.
If Maven Integration for Eclipse is installed then leave this box unchecked.
Create a New Scala Project
Check that the Maven and Scala support exists in Eclipse.
Create a new Scala maven project using a simple Scala project based on an archetype.
1. Select New > Project > Other and then select Maven Project.
2. On the next window, search for
scala-archetype. Make sure you select the one in group net.alchim31.maven, and click Next.
3. Follow the wizard and enter values for Group ID, Artifact ID, etc.
4. Click Finish and you should have a new Scala project in the workspace.
5. Verify that the new project has both the Maven and Scala nature, and
src/main/scala is listed as a source folder.
6. Build and launch your project or run tests.