Skip to content

Commit b1ed32b

Browse files
author
Adriaan Moors
committed
eclipse project files are now in src/eclipse
To use these project files you need to define the Eclipse 'path variable' SCALA_BASEDIR, in General/Workspace/Linked Resources. see src/eclipse/README.md for more info backport to 2.9.x of fd6573a ceb0953 98a5714 49169e2 64f0597 27aaaa4
1 parent 9f8ef8c commit b1ed32b

File tree

12 files changed

+268
-13
lines changed

12 files changed

+268
-13
lines changed

classpath.SAMPLE

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/eclipse/README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
Eclipse project files
2+
=====================
3+
4+
Import all projects inside Eclipse by choosing File/Import Existing Projects
5+
and navigate to src/eclipse. Check all projects and click ok.
6+
7+
IMPORTANT
8+
=========
9+
10+
1. You need to define a `path variable` inside Eclipse. Define SCALA_BASEDIR in
11+
Preferences/General/Workspace/Linked Resources. The value should be the absolute
12+
path to your scala checkout. All paths in project files are relative to this one,
13+
so nothing will work before you do so.
14+
15+
2. The Eclipse Java compiler does not allow certain calls to restricted APIs in the
16+
JDK. The Scala library uses such APIs, so you'd see this error:
17+
18+
Access restriction: The method compareAndSwapObject(Object, long, Object, Object)
19+
from the type Unsafe is not accessible due to restriction on required library.
20+
You can *fix* it by allowing calls to restricted APIs in `Java=>Compiler=>Errors/Warnings=>Deprecated and Restricted API`
21+
settings.
22+
23+
3. The IDE guesses the Scala library version by looking for `library.properties` inside
24+
the library jar. The `scala-library` project does not have such a file, so you will see
25+
an error about incompatible libraries. You can work around it by adding a `library.properties`
26+
inside `src/library` with the following contents:
27+
28+
#Mon, 04 Jun 2012 02:08:56 +0200
29+
version.number=2.10.0-20120603-141530-b34313db72
30+
maven.version.number=2.10.0-SNAPSHOT
31+
osgi.version.number=2.10.0.v20120603-141530-b34313db72
32+
copyright.string=Copyright 2002-2012 LAMP/EPFL
33+
34+
4. Project files are tracked by Git, so adding them to `.gitignore` won't prevent them
35+
from being shown as dirty in `git status`. You can still ignore them by telling Git to
36+
consider them unchanged:
37+
38+
git update-index --assume-unchanged `find src/eclipse -iname .classpath -or -iname .project`
39+
40+
If you want to go back to normal (for instance, to commit your changes to project files), run:
41+
42+
git update-index --no-assume-unchanged `find src/eclipse -iname .classpath -or -iname .project`
43+
44+
DETAILS
45+
=======
46+
47+
The compiler project depends on the library, reflect, asm and fjbg projects. The
48+
builder will take care of the correct ordering, and changes in one project will
49+
be picked up by the dependent projects.
50+
51+
The output directory is set to be build/quick, so the runner scripts in quick
52+
work as they are (run an ant build to have them generated once)

src/eclipse/fjbg/.classpath

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="fjbg"/>
4+
<classpathentry kind="con" path="org.scala-ide.sdt.launching.SCALA_CONTAINER"/>
5+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
6+
<classpathentry kind="output" path="libs-classes-fjbg"/>
7+
</classpath>

src/eclipse/fjbg/.project

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>fjbg</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.scala-ide.sdt.core.scalabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.scala-ide.sdt.core.scalanature</nature>
16+
<nature>org.eclipse.jdt.core.javanature</nature>
17+
</natures>
18+
<linkedResources>
19+
<link>
20+
<name>fjbg</name>
21+
<type>2</type>
22+
<locationURI>SCALA_BASEDIR/src/fjbg</locationURI>
23+
</link>
24+
<link>
25+
<name>libs-classes-fjbg</name>
26+
<type>2</type>
27+
<locationURI>SCALA_BASEDIR/build/libs/classes/fjbg</locationURI>
28+
</link>
29+
</linkedResources>
30+
</projectDescription>

src/eclipse/partest/.classpath

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="partest"/>
4+
<classpathentry combineaccessrules="false" kind="src" path="/reflect"/>
5+
<classpathentry combineaccessrules="false" kind="src" path="/scala-library"/>
6+
<classpathentry combineaccessrules="false" kind="src" path="/scala-compiler"/>
7+
<classpathentry combineaccessrules="false" kind="src" path="/scalap"/>
8+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
9+
<classpathentry kind="lib" path="lib/ant/ant.jar"/>
10+
<classpathentry kind="lib" path="lib/jline.jar"/>
11+
<classpathentry kind="lib" path="lib/msil.jar"/>
12+
<classpathentry combineaccessrules="false" kind="src" path="/asm"/>
13+
<classpathentry kind="output" path="build-quick-partest"/>
14+
</classpath>

src/eclipse/partest/.project

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>partest</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.scala-ide.sdt.core.scalabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.scala-ide.sdt.core.scalanature</nature>
16+
<nature>org.eclipse.jdt.core.javanature</nature>
17+
</natures>
18+
<linkedResources>
19+
<link>
20+
<name>build-quick-partest</name>
21+
<type>2</type>
22+
<locationURI>SCALA_BASEDIR/build/quick/classes/partest</locationURI>
23+
</link>
24+
<link>
25+
<name>lib</name>
26+
<type>2</type>
27+
<locationURI>SCALA_BASEDIR/lib</locationURI>
28+
</link>
29+
<link>
30+
<name>partest</name>
31+
<type>2</type>
32+
<locationURI>SCALA_BASEDIR/src/partest</locationURI>
33+
</link>
34+
</linkedResources>
35+
</projectDescription>

src/eclipse/scala-compiler/.classpath

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="compiler"/>
4+
<classpathentry combineaccessrules="false" kind="src" path="/scala-library"/>
5+
<classpathentry combineaccessrules="false" kind="src" path="/fjbg"/>
6+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
7+
<classpathentry kind="lib" path="lib/ant/ant.jar"/>
8+
<classpathentry kind="lib" path="lib/jline.jar"/>
9+
<classpathentry kind="lib" path="lib/msil.jar"/>
10+
<classpathentry kind="output" path="build-quick-compiler"/>
11+
</classpath>

src/eclipse/scala-compiler/.project

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>scala-compiler</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.scala-ide.sdt.core.scalabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.scala-ide.sdt.core.scalanature</nature>
16+
<nature>org.eclipse.jdt.core.javanature</nature>
17+
</natures>
18+
<linkedResources>
19+
<link>
20+
<name>build-quick-compiler</name>
21+
<type>2</type>
22+
<locationURI>SCALA_BASEDIR/build/quick/classes/compiler</locationURI>
23+
</link>
24+
<link>
25+
<name>compiler</name>
26+
<type>2</type>
27+
<locationURI>SCALA_BASEDIR/src/compiler</locationURI>
28+
</link>
29+
<link>
30+
<name>lib</name>
31+
<type>2</type>
32+
<locationURI>SCALA_BASEDIR/lib</locationURI>
33+
</link>
34+
</linkedResources>
35+
</projectDescription>

src/eclipse/scala-library/.classpath

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="library"/>
4+
<classpathentry kind="con" path="org.scala-ide.sdt.launching.SCALA_CONTAINER"/>
5+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
6+
<classpathentry kind="output" path="build-quick-lib"/>
7+
</classpath>

src/eclipse/scala-library/.project

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>scala-library</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.scala-ide.sdt.core.scalabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.scala-ide.sdt.core.scalanature</nature>
16+
<nature>org.eclipse.jdt.core.javanature</nature>
17+
</natures>
18+
<linkedResources>
19+
<link>
20+
<name>build-quick-lib</name>
21+
<type>2</type>
22+
<locationURI>SCALA_BASEDIR/build/quick/classes/library</locationURI>
23+
</link>
24+
<link>
25+
<name>library</name>
26+
<type>2</type>
27+
<locationURI>SCALA_BASEDIR/src/library</locationURI>
28+
</link>
29+
</linkedResources>
30+
</projectDescription>

0 commit comments

Comments
 (0)