diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2016-04-20 15:58:08 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@typesafe.com> | 2016-04-20 15:58:08 +0200 |
commit | 23159d2842fcc64f5d3fc962b292030627b3a1a1 (patch) | |
tree | 6fa57b3d511b5b1e6b4847e72330ab80309de1bc /src/eclipse/README.md | |
parent | 1fcfdd8c8bca1adba6eff2381ac6e765141801f0 (diff) | |
download | scala-23159d2842fcc64f5d3fc962b292030627b3a1a1.tar.gz scala-23159d2842fcc64f5d3fc962b292030627b3a1a1.tar.bz2 scala-23159d2842fcc64f5d3fc962b292030627b3a1a1.zip |
Automate Eclipse settings and update project files: (#5091)
- remove `M2_REPO`. All dependencies are picked up from `build/deps`
- add script to update an existing workspace directory with the required path variables
- add the default Scala library to several projects for better out-of-the-box experience. This means
that changes in the scale-library project may not be visible in the other projects, but makes it
way easier to get a working config. If you really need that, you probably know what you’re doing
anyway.
Diffstat (limited to 'src/eclipse/README.md')
-rw-r--r-- | src/eclipse/README.md | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/eclipse/README.md b/src/eclipse/README.md index fe2c109402..d541092361 100644 --- a/src/eclipse/README.md +++ b/src/eclipse/README.md @@ -7,21 +7,20 @@ The following points describe how to build Scala using Eclipse. 0. Download the [Scala IDE bundle](http://scala-ide.org/download/sdk.html). It comes preconfigured for optimal performance. -0. Run `ant init` to download some necessary jars. - -0. Import the project (in `src/eclipse`) via `File` → `Import Existing Projects` and navigate to `scala/src/eclipse`. Check all projects and click ok. - -0. You need to define a `path variable` inside Eclipse. Define `SCALA_BASEDIR` in -`Preferences/General/Workspace/Linked Resources`. The value should be the absolute -path to your Scala checkout. All paths in the project files are relative to this one, -so nothing will work before you do so. - - The same `SCALA_BASEDIR` variable needs to be defined as a `classpath variable` in +0. Run `ant build` to download some necessary jars and see a successful build. + +0. You need to define a `path variable` and a `classpath variable` inside Eclipse, both pointing to the Scala checkout directory: + - (experimental): run `./update-workspace.sh scala_checkout_dir [workspace_dir]`. This should update your workspace settings + (restart Eclipse if it was running). For example: + ``` + ./update-workspace.sh $HOME/git/scala ~/Documents/workspace-scalac + ``` + - If the above didn't work, you can perform these steps manually: Define `SCALA_BASEDIR` in `Preferences/General/Workspace/Linked Resources`. The value should be the absolute +path to your Scala checkout. All paths in the project files are relative to this one, so nothing will work before you do so. +The same `SCALA_BASEDIR` variable needs to be defined **also** as a `classpath variable` in `Java/Build Path/Classpath Variables`. - Additionally, we start using Maven dependencies (e.g. `JUnit`) so you need to define another -`classpath variable` inside Eclipse. Define `M2_REPO` in `Java/Build Path/Classpath Variables` -to point to your local Maven repository (e.g. `$HOME/.m2/repository`). +0. Import the project (in `src/eclipse`) via `File` → `Import Existing Projects` and navigate to `scala/src/eclipse`. Check all projects and click ok. Lastly, the JRE used by Eclipse needs to know the path to the `JLine` library, which is used by the REPL. To set the JAR file, navigate to `Java/Installed JREs`, select the default JRE, press `Edit/Add External JARs...` |