Skip to content

Commit 53d4ec0

Browse files
committed
Merge pull request scala#1867 from huitseeker/backport/1721
SI-6766 Create a continuations project in eclipse ( backports scala#1721)
2 parents 1af6e92 + 0bde246 commit 53d4ec0

File tree

7 files changed

+47
-2
lines changed

7 files changed

+47
-2
lines changed

src/eclipse/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ JDK. The Scala library uses such APIs, so you'd see this error:
2020
You can *fix* it by allowing calls to restricted APIs in `Java=>Compiler=>Errors/Warnings=>Deprecated and Restricted API`
2121
settings.
2222

23-
3. The IDE guesses the Scala library version by looking for `library.properties` inside
23+
3. We need to build the continuations library for some dependencies and that library requires the continuations plugin to be enabled. In preferences go to Scala=>Compiler and add "continuations:enable" to the P parameter.
24+
25+
4. The IDE guesses the Scala library version by looking for `library.properties` inside
2426
the library jar. The `scala-library` project does not have such a file, so you will see
2527
an error about incompatible libraries. You can work around it by adding a `library.properties`
2628
inside `src/library` with the following contents:
@@ -31,7 +33,7 @@ inside `src/library` with the following contents:
3133
osgi.version.number=2.10.0.v20120603-141530-b34313db72
3234
copyright.string=Copyright 2002-2012 LAMP/EPFL
3335

34-
4. Project files are tracked by Git, so adding them to `.gitignore` won't prevent them
36+
5. Project files are tracked by Git, so adding them to `.gitignore` won't prevent them
3537
from being shown as dirty in `git status`. You can still ignore them by telling Git to
3638
consider them unchanged:
3739

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="library"/>
4+
<classpathentry combineaccessrules="false" kind="src" path="/scala-library"/>
5+
<classpathentry kind="con" path="org.scala-ide.sdt.launching.SCALA_CONTAINER"/>
6+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
7+
<classpathentry kind="output" path="build-quick-continuations-library"/>
8+
</classpath>
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>continuations-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-continuations-library</name>
21+
<type>2</type>
22+
<locationURI>SCALA_BASEDIR/build/quick/classes/continuations/library</locationURI>
23+
</link>
24+
<link>
25+
<name>library</name>
26+
<type>2</type>
27+
<locationURI>SCALA_BASEDIR/src/continuations/library</locationURI>
28+
</link>
29+
</linkedResources>
30+
</projectDescription>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
P=continuations\:enable
2+
scala.compiler.useProjectSettings=true

src/eclipse/partest/.classpath

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
<classpathentry kind="lib" path="lib/jline.jar"/>
1111
<classpathentry kind="lib" path="lib/msil.jar"/>
1212
<classpathentry combineaccessrules="false" kind="src" path="/asm"/>
13+
<classpathentry combineaccessrules="false" kind="src" path="/continuations-library"/>
1314
<classpathentry kind="output" path="build-quick-partest"/>
1415
</classpath>

src/eclipse/scala-compiler/.classpath

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
<classpathentry kind="lib" path="lib/ant/ant.jar"/>
88
<classpathentry kind="lib" path="lib/jline.jar"/>
99
<classpathentry kind="lib" path="lib/msil.jar"/>
10+
<classpathentry combineaccessrules="false" kind="src" path="/continuations-library"/>
1011
<classpathentry kind="output" path="build-quick-compiler"/>
1112
</classpath>

src/eclipse/scalap/.classpath

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
<classpathentry kind="lib" path="lib/ant/ant.jar"/>
99
<classpathentry kind="lib" path="lib/jline.jar"/>
1010
<classpathentry kind="lib" path="lib/msil.jar"/>
11+
<classpathentry combineaccessrules="false" kind="src" path="/continuations-library"/>
1112
<classpathentry kind="output" path="build-quick-scalap"/>
1213
</classpath>

0 commit comments

Comments
 (0)