Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge sbt integration into our main branch. Sbt builder available by …

…choosing it in the Scala -> Build Manager -> sbt. Have fun! Error reporting in mixed Scala/Java projects for Java files needs more work (eg getting location from stdout java compiler error messages) but other than that multi- and mixed-project integration works fine.
  • Loading branch information...
commit ca6e94db49fa679e3d0b7bc4c36597e5988e2229 1 parent 198e058
@hubertp hubertp authored
Showing with 1,424 additions and 54 deletions.
  1. +7 −1 org.scala-ide.build-toolchain/build-toolchain-2.8.1.final.sh
  2. +8 −1 org.scala-ide.build-toolchain/build-toolchain-2.8.x.sh
  3. +7 −1 org.scala-ide.build-toolchain/build-toolchain-2.9.0-1.sh
  4. +8 −1 org.scala-ide.build-toolchain/build-toolchain-2.9.0.final.sh
  5. +9 −2 org.scala-ide.build-toolchain/build-toolchain-2.9.x.sh
  6. +7 −1 org.scala-ide.build-toolchain/build-toolchain-trunk.sh
  7. +4 −0 org.scala-ide.build-toolchain/env.sh
  8. +59 −0 org.scala-ide.build-toolchain/pom.xml
  9. +1 −0  org.scala-ide.build/build-ide-2.8.0.final
  10. +1 −0  org.scala-ide.build/build-ide-2.8.1.final
  11. +1 −0  org.scala-ide.build/build-ide-2.8.2-SNAPSHOT
  12. +1 −0  org.scala-ide.build/build-ide-2.9.0-1.sh
  13. +1 −0  org.scala-ide.build/build-ide-2.9.0.final.sh
  14. +1 −0  org.scala-ide.build/build-ide-2.9.1-SNAPSHOT
  15. +1 −0  org.scala-ide.build/build-ide-local-trunk.sh
  16. +1 −0  org.scala-ide.build/build-ide-trunk.sh
  17. +1 −0  org.scala-ide.build/env.sh
  18. +41 −1 org.scala-ide.build/pom.xml
  19. +32 −0 org.scala-ide.sbt/.classpath
  20. +22 −0 org.scala-ide.sbt/.project
  21. +463 −0 org.scala-ide.sbt/pom.xml
  22. +1 −1  org.scala-ide.scala.compiler/pom.xml
  23. +1 −1  org.scala-ide.scala.library/pom.xml
  24. +37 −9 org.scala-ide.sdt.core/.classpath
  25. +1 −0  org.scala-ide.sdt.core/META-INF/MANIFEST.MF
  26. +1 −1  org.scala-ide.sdt.core/pom.xml
  27. +14 −4 org.scala-ide.sdt.core/src/scala/tools/eclipse/ScalaBuilder.scala
  28. +1 −1  org.scala-ide.sdt.core/src/scala/tools/eclipse/ScalaClasspathContainers.scala
  29. +22 −1 org.scala-ide.sdt.core/src/scala/tools/eclipse/ScalaPlugin.scala
  30. +4 −4 org.scala-ide.sdt.core/src/scala/tools/eclipse/ScalaProject.scala
  31. +19 −5 org.scala-ide.sdt.core/src/scala/tools/eclipse/buildmanager/BuildReporter.scala
  32. +1 −0  org.scala-ide.sdt.core/src/scala/tools/eclipse/buildmanager/refined/EclipseRefinedBuildManager.scala
  33. +155 −0 org.scala-ide.sdt.core/src/scala/tools/eclipse/buildmanager/sbtintegration/AnalysisCompile.scala
  34. +375 −11 org.scala-ide.sdt.core/src/scala/tools/eclipse/buildmanager/sbtintegration/EclipseSbtBuildManager.scala
  35. +79 −0 org.scala-ide.sdt.core/src/scala/tools/eclipse/buildmanager/sbtintegration/SbtConf.scala
  36. +21 −0 org.scala-ide.sdt.core/src/scala/tools/eclipse/buildmanager/sbtintegration/ScalaSbtCompiler.scala
  37. +1 −1  org.scala-ide.sdt.core/src/scala/tools/eclipse/properties/CompilerSettings.scala
  38. +8 −7 org.scala-ide.sdt.core/src/scala/tools/eclipse/util/IDESettings.scala
  39. +7 −0 org.scala-ide.sdt.feature/feature.xml
View
8 org.scala-ide.build-toolchain/build-toolchain-2.8.1.final.sh
@@ -3,7 +3,13 @@
. $(dirname $0)/env.sh
SCALA_VERSION=2.8.1
+SCALA_PRECOMPILED=2_8_1
+SBT_VERSION=0.10.1-SNAPSHOT
+SBT_SCALA_VERSION=2.8.1
+SBINARY_VERSION=0.4.0
-set_version ${SCALA_VERSION}
+set_version ${SCALA_VERSION} ${SBT_VERSION} ${SBINARY_VERSION} ${SCALA_PRECOMPILED} ${SBT_SCALA_VERSION}
+
+PROFILE="-P sbt-2.8"
build $*
View
9 org.scala-ide.build-toolchain/build-toolchain-2.8.x.sh
@@ -3,7 +3,14 @@
. $(dirname $0)/env.sh
SCALA_VERSION=2.8.2-SNAPSHOT
+#THIS NEEDS TO BE UPDATED ONCE WE HAVE SNAPSHOTS
+SCALA_PRECOMPILED=2_8_2-SNAPSHOT
+SBT_SCALA_VERSION=2.8.1
+SBT_VERSION=0.10.1-SNAPSHOT
+SBINARY_VERSION=0.4.0
-set_version ${SCALA_VERSION}
+set_version ${SCALA_VERSION} ${SBT_VERSION} ${SBINARY_VERSION} ${SCALA_PRECOMPILED} ${SBT_SCALA_VERSION}
+
+PROFILE="-P sbt-2.8,default"
build $*
View
8 org.scala-ide.build-toolchain/build-toolchain-2.9.0-1.sh
@@ -3,7 +3,13 @@
. $(dirname $0)/env.sh
SCALA_VERSION=2.9.0-1
+SCALA_PRECOMPILED=2_9_0-1
+SBT_VERSION=0.10.1-SNAPSHOT
+SBT_SCALA_VERSION=2.9.0-1
+SBINARY_VERSION=0.4.0
-set_version ${SCALA_VERSION}
+set_version ${SCALA_VERSION} ${SBT_VERSION} ${SBINARY_VERSION} ${SCALA_PRECOMPILED} ${SBT_SCALA_VERSION}
+
+PROFILE="-P sbt-2.9,default"
build $*
View
9 org.scala-ide.build-toolchain/build-toolchain-2.9.0.final.sh
@@ -2,8 +2,15 @@
. $(dirname $0)/env.sh
+
SCALA_VERSION=2.9.0
+SCALA_PRECOMPILED=2_9_0
+SBT_VERSION=0.10.1-SNAPSHOT
+SBT_SCALA_VERSION=2.9.0
+SBINARY_VERSION=0.4.0
+
+set_version ${SCALA_VERSION} ${SBT_VERSION} ${SBINARY_VERSION} ${SCALA_PRECOMPILED} ${SBT_SCALA_VERSION}
-set_version ${SCALA_VERSION}
+PROFILE="-P sbt-2.9,default"
build $*
View
11 org.scala-ide.build-toolchain/build-toolchain-2.9.x.sh
@@ -2,8 +2,15 @@
. $(dirname $0)/env.sh
-SCALA_VERSION=2.9.0-SNAPSHOT
+SCALA_VERSION=2.9.1-SNAPSHOT
+#THIS NEEDS TO BE UPDATED ONCE WE HAVE SNAPSHOTS
+SCALA_PRECOMPILED=2_9_1-SNAPSHOT
+SBT_SCALA_VERSION=2.9.0-1
+SBT_VERSION=0.10.1-SNAPSHOT
+SBINARY_VERSION=0.4.0
-set_version ${SCALA_VERSION}
+set_version ${SCALA_VERSION} ${SBT_VERSION} ${SBINARY_VERSION} ${SCALA_PRECOMPILED} ${SBT_SCALA_VERSION}
+
+PROFILE="-P sbt-2.9,default"
build $*
View
8 org.scala-ide.build-toolchain/build-toolchain-trunk.sh
@@ -3,7 +3,13 @@
. $(dirname $0)/env.sh
SCALA_VERSION=2.10.0-SNAPSHOT
+SBT_VERSION=0.10.1-SNAPSHOT
+SBT_SCALA_VERSION=2.10.0-SNAPSHOT
+SBINARY_VERSION=0.4.0
+SCALA_PRECOMPILED=2_10_0-SNAPSHOT
-set_version ${SCALA_VERSION}
+set_version ${SCALA_VERSION} ${SBT_VERSION} ${SBINARY_VERSION} ${SCALA_PRECOMPILED} ${SBT_SCALA_VERSION}
+
+PROFILE="-P sbt-2.10,default"
build $*
View
4 org.scala-ide.build-toolchain/env.sh
@@ -25,6 +25,10 @@ build()
-U \
$PROFILE \
-Dscala.version=${SCALA_VERSION} \
+ -Dsbt.version=${SBT_VERSION} \
+ -Dsbt.scala.version=${SBT_SCALA_VERSION} \
+ -Dsbinary.version=${SBINARY_VERSION} \
+ -Dscala.precompiled.version=${SCALA_PRECOMPILED} \
clean install $*
}
View
59 org.scala-ide.build-toolchain/pom.xml
@@ -10,6 +10,7 @@
<properties>
<scala.version>2.8.0</scala.version>
+ <sbt.version>0.10.1-SNAPSHOT</sbt.version>
<patch.level>p0002</patch.level>
<encoding>UTF-8</encoding>
</properties>
@@ -17,6 +18,7 @@
<modules>
<module>../org.scala-ide.scala.compiler</module>
<module>../org.scala-ide.scala.library</module>
+ <module>../org.scala-ide.sbt</module>
</modules>
<dependencyManagement>
<dependencies>
@@ -100,6 +102,63 @@
<patch.level.suffix></patch.level.suffix>
</properties>
</profile>
+
+ <profile>
+ <id>sbt-2.10</id>
+ <properties>
+ <scala.compiler.groupid>org.scala-lang</scala.compiler.groupid>
+ <scala.compiler.version>${scala.version}</scala.compiler.version>
+ <scala.major.minor.version>2.10</scala.major.minor.version>
+ <sbt.compiled.version>${sbt.scala.version}</sbt.compiled.version>
+ <maintenance.suffix></maintenance.suffix>
+ <patch.level.suffix></patch.level.suffix>
+ </properties>
+ <repositories>
+ <repository>
+ <id>typesafe-ide-2.10</id>
+ <name>Typesafe IDE 2.10 repository</name>
+ <url>http://repo.typesafe.com/typesafe/ide-2.10</url>
+ </repository>
+ </repositories>
+ </profile>
+
+ <profile>
+ <id>sbt-2.9</id>
+ <properties>
+ <scala.compiler.groupid>org.scala-lang</scala.compiler.groupid>
+ <scala.compiler.version>${scala.version}</scala.compiler.version>
+ <scala.major.minor.version>2.9</scala.major.minor.version>
+ <sbt.compiled.version>${sbt.scala.version}</sbt.compiled.version>
+ <maintenance.suffix></maintenance.suffix>
+ <patch.level.suffix></patch.level.suffix>
+ </properties>
+ <repositories>
+ <repository>
+ <id>typesafe-ide-2.9</id>
+ <name>Typesafe IDE 2.9 repository</name>
+ <url>http://repo.typesafe.com/typesafe/ide-2.9</url>
+ </repository>
+ </repositories>
+ </profile>
+
+ <profile>
+ <id>sbt-2.8</id>
+ <properties>
+ <scala.compiler.groupid>org.scala-lang</scala.compiler.groupid>
+ <scala.compiler.version>${scala.version}</scala.compiler.version>
+ <scala.major.minor.version>2.8</scala.major.minor.version>
+ <sbt.compiled.version>${sbt.scala.version}</sbt.compiled.version>
+ <maintenance.suffix></maintenance.suffix>
+ <patch.level.suffix></patch.level.suffix>
+ </properties>
+ <repositories>
+ <repository>
+ <id>typesafe-ide-2.8</id>
+ <name>Typesafe IDE 2.8 repository</name>
+ <url>http://repo.typesafe.com/typesafe/ide-2.8</url>
+ </repository>
+ </repositories>
+ </profile>
<profile>
View
1  org.scala-ide.build/build-ide-2.8.0.final
@@ -3,5 +3,6 @@
. $(dirname $0)/env.sh
SCALA_VERSION=2.8.0
+SBT_VERSION=2.8.1
build $*
View
1  org.scala-ide.build/build-ide-2.8.1.final
@@ -3,5 +3,6 @@
. $(dirname $0)/env.sh
SCALA_VERSION=2.8.1
+SBT_VERSION=2.8.1
build $*
View
1  org.scala-ide.build/build-ide-2.8.2-SNAPSHOT
@@ -3,5 +3,6 @@
. $(dirname $0)/env.sh
SCALA_VERSION=2.8.2-SNAPSHOT
+SBT_VERSION=2.8.2-SNAPSHOT
build $*
View
1  org.scala-ide.build/build-ide-2.9.0-1.sh
@@ -3,5 +3,6 @@
. $(dirname $0)/env.sh
SCALA_VERSION=2.9.0-1
+SBT_VERSION=2.9.0-1
build $*
View
1  org.scala-ide.build/build-ide-2.9.0.final.sh
@@ -3,5 +3,6 @@
. $(dirname $0)/env.sh
SCALA_VERSION=2.9.0
+SBT_VERSION=2.9.0
build $*
View
1  org.scala-ide.build/build-ide-2.9.1-SNAPSHOT
@@ -3,5 +3,6 @@
. $(dirname $0)/env.sh
SCALA_VERSION=2.9.1-SNAPSHOT
+SBT_VERSION=2.9.1-SNAPSHOT
build $*
View
1  org.scala-ide.build/build-ide-local-trunk.sh
@@ -3,6 +3,7 @@
. $(dirname $0)/env.sh
SCALA_VERSION=2.10.0-SNAPSHOT
+SBT_VERSION=2.10.0-SNAPSHOT
PROFILE_NAME="-P local-scala-trunk,!scala-trunk"
build $*
View
1  org.scala-ide.build/build-ide-trunk.sh
@@ -3,5 +3,6 @@
. $(dirname $0)/env.sh
SCALA_VERSION=2.10.0-SNAPSHOT
+SBT_VERSION=2.10.0-SNAPSHOT
build $*
View
1  org.scala-ide.build/env.sh
@@ -34,6 +34,7 @@ build()
${MAVEN} \
$PROFILE_NAME -U \
-Dscala.version=${SCALA_VERSION} \
+ -Dsbt.version=${SBT_VERSION} \
-Dgit.hash=${GIT_HASH} \
-Dversion.tag=${VERSION_TAG}\
clean install $*
View
42 org.scala-ide.build/pom.xml
@@ -13,7 +13,7 @@
<version.tag>nightly</version.tag>
<version.suffix>210</version.suffix>
<tycho.version>0.11.1</tycho.version>
- <sbt.version>0.9.0-SNAPSHOT</sbt.version>
+ <sbt.version>0.10.1-SNAPSHOT</sbt.version>
<maven.compiler.source>1.5</maven.compiler.source>
<maven.compiler.target>1.5</maven.compiler.target>
<encoding>UTF-8</encoding>
@@ -194,6 +194,13 @@
<value>2.8.1</value>
</property>
</activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.scala-ide</groupId>
+ <artifactId>org.scala-ide.sbt.full.library</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ </dependencies>
<properties>
<version.suffix>28</version.suffix>
</properties>
@@ -227,6 +234,13 @@
<value>2.8.2-SNAPSHOT</value>
</property>
</activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.scala-ide</groupId>
+ <artifactId>org.scala-ide.sbt.full.library</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ </dependencies>
<properties>
<version.suffix>28</version.suffix>
</properties>
@@ -292,6 +306,13 @@
<value>2.9.0-1</value>
</property>
</activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.scala-ide</groupId>
+ <artifactId>org.scala-ide.sbt.full.library</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ </dependencies>
<properties>
<version.suffix>29</version.suffix>
</properties>
@@ -325,6 +346,13 @@
<value>2.9.1-SNAPSHOT</value>
</property>
</activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.scala-ide</groupId>
+ <artifactId>org.scala-ide.sbt.full.library</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ </dependencies>
<properties>
<version.suffix>29</version.suffix>
</properties>
@@ -357,6 +385,13 @@
<value>2.10.0-SNAPSHOT</value>
</property>
</activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.scala-ide</groupId>
+ <artifactId>org.scala-ide.sbt.full.library</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ </dependencies>
<repositories>
<repository>
<id>scala-refactoring-trunk</id>
@@ -495,6 +530,11 @@
<artifactId>org.scala-ide.scala.compiler</artifactId>
<version>${scala.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.scala-ide</groupId>
+ <artifactId>org.scala-ide.sbt.full.library</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
</dependencies>
<repositories>
<repository>
View
32 org.scala-ide.sbt/.classpath
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="lib" path="lib/actions_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="lib/api_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="lib/cache_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="lib/classfile_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="lib/classpath_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="lib/collections_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="lib/compile_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="lib/completion_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="lib/control_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="lib/discovery_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="lib/incremental-compiler_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="lib/interface_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="lib/io_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="lib/ivy_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="lib/ivy.jar"/>
+ <classpathentry kind="lib" path="lib/jline.jar"/>
+ <classpathentry kind="lib" path="lib/launcher_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="lib/launcher-interface_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="lib/logging_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="lib/main_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="lib/persist_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="lib/precompiled-2.10.0-SNAPSHOT-2_10_0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="lib/process_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="lib/run_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="lib/sbinary_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="lib/sbt_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="lib/task-system_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="lib/tasks_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="output" path="classes"/>
+</classpath>
View
22 org.scala-ide.sbt/.project
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.scala-ide.sbt</name>
+ <comment></comment>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.scala-ide.sdt.core.scalanature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
View
463 org.scala-ide.sbt/pom.xml
@@ -0,0 +1,463 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.scala-ide</groupId>
+ <artifactId>scala-toolchain-for-eclipse</artifactId>
+ <version>2.9.1-SNAPSHOT</version>
+ <relativePath>../org.scala-ide.build-toolchain/pom.xml</relativePath>
+ </parent>
+ <artifactId>org.scala-ide.sbt.full.library</artifactId>
+ <packaging>bundle</packaging>
+ <dependencies>
+ <dependency>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>actions_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>api_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>cache_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>classfile_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>classpath_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>collections_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>compile_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>control_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>discovery_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>incremental-compiler_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>io_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>ivy_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>launcher-interface_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>logging_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>main_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>persist_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>process_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>run_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>tasks_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>task-system_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>sbt_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>completion_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <!-- all the other dependencies -->
+ <dependency>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>launcher_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <!-- use the interface with which we were built -->
+ <dependency>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>precompiled-${sbt.compiled.version}-${scala.precompiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>interface_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <!-- all the dependencies necessary for running like sbinary, ivy, jline -->
+ <dependency>
+ <groupId>jline</groupId>
+ <artifactId>jline</artifactId>
+ <version>0.9.94</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ivy</groupId>
+ <artifactId>ivy</artifactId>
+ <version>2.2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-tools.sbinary</groupId>
+ <artifactId>sbinary_${sbt.compiled.version}</artifactId>
+ <version>${sbinary.version}</version>
+ </dependency>
+ <!-- Should be the one with which we built sbt, for now, let's use 2.9.0 -->
+ </dependencies>
+ <build>
+ <outputDirectory>${basedir}</outputDirectory>
+ <plugins>
+ <plugin>
+ <artifactId>maven-clean-plugin</artifactId>
+ <version>2.4.1</version>
+ <configuration>
+ <excludeDefaultDirectories>true</excludeDefaultDirectories>
+ <filesets>
+ <fileset>
+ <directory>./</directory>
+ <includes>
+ <include>META-INF/**/*</include>
+ <include>META-INF</include>
+ <include>lib/**/*</include>
+ <include>lib</include>
+ <include>target/**/*</include>
+ <include>target</include>
+ </includes>
+ <followSymlinks>false</followSymlinks>
+ </fileset>
+ </filesets>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>unpack</id>
+ <phase>initialize</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>actions_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>api_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>cache_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>classfile_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>classpath_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>collections_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>compile_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>control_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>discovery_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>incremental-compiler_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>io_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>ivy_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>launcher-interface_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>logging_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>main_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>persist_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>process_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>run_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>tasks_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>task-system_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>sbt_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>completion_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </artifactItem>
+ <!-- all the other dependencies -->
+ <artifactItem>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>launcher_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>interface_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </artifactItem>
+ <!-- use the interface with which we were built -->
+ <artifactItem>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>precompiled-${sbt.compiled.version}-${scala.precompiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </artifactItem>
+ <!-- all the dependencies necessary for running like sbinary, ivy, jline -->
+ <artifactItem>
+ <groupId>jline</groupId>
+ <artifactId>jline</artifactId>
+ <version>0.9.94</version>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.apache.ivy</groupId>
+ <artifactId>ivy</artifactId>
+ <version>2.2.0</version>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.scala-tools.sbinary</groupId>
+ <artifactId>sbinary_${sbt.compiled.version}</artifactId>
+ <version>${sbinary.version}</version>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.scala-lang</groupId>
+ <artifactId>scala-library</artifactId>
+ <version>${scala.compiler.version}</version>
+ <classifier>sources</classifier>
+ <type>jar</type>
+ <destFileName>scala-${scala.major.minor.version}/lib/scala-library-src.jar</destFileName>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.scala-lang</groupId>
+ <artifactId>scala-library</artifactId>
+ <version>${scala.compiler.version}</version>
+ <type>jar</type>
+ <destFileName>scala-${scala.major.minor.version}/lib/scala-library.jar</destFileName>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.scala-lang</groupId>
+ <artifactId>scala-compiler</artifactId>
+ <version>${scala.compiler.version}</version>
+ <classifier>sources</classifier>
+ <type>jar</type>
+ <destFileName>scala-${scala.major.minor.version}/lib/scala-compiler-src.jar</destFileName>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.scala-lang</groupId>
+ <artifactId>scala-compiler</artifactId>
+ <version>${scala.compiler.version}</version>
+ <type>jar</type>
+ <destFileName>scala-${scala.major.minor.version}/lib/scala-compiler.jar</destFileName>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.scala-tools.sbt</groupId>
+ <artifactId>precompiled-${sbt.compiled.version}-${scala.precompiled.version}</artifactId>
+ <version>0.10.1-SNAPSHOT</version>
+ <type>jar</type>
+ <destFileName>scala-${scala.major.minor.version}/lib/compiler-interface.jar</destFileName>
+ </artifactItem>
+ </artifactItems>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>properties-maven-plugin</artifactId>
+ <version>1.0-alpha-2</version>
+ <executions>
+ <execution>
+ <phase>initialize</phase>
+ <goals>
+ <goal>read-project-properties</goal>
+ </goals>
+ <configuration>
+ <files>
+<!-- <file>${project.build.directory}/xsbt.version.properties</file>-->
+<!-- <file>${project.build.directory}/library.properties</file>
+ <file>${project.build.directory}/compiler.properties</file>-->
+ </files>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>2.1.0</version>
+ <extensions>true</extensions>
+ <configuration>
+ <unpackBundle>true</unpackBundle>
+ <instructions>
+ <Bundle-SymbolicName>org.scala-ide.sbt.full.library</Bundle-SymbolicName>
+ <Bundle-Name>Sbt ${sbt.version} Library for Eclipse</Bundle-Name>
+ <Bundle-Version>${scala.version}-${patch.level}</Bundle-Version>
+ <Embed-Dependency>*;scope=compile|runtime;inline=false</Embed-Dependency>
+ <_exportcontents>sbt.*;version=${sbt.version},xsbt.*;version=${sbt.version},xsbti.*;version=${sbt.version},sbinary.*;version=${sbinary.version},jline.*;version=0.9.94,org.apache.ivy.*;version=2.2.0</_exportcontents>
+ <Embed-Directory>lib</Embed-Directory>
+ <Embed-StripVersion>true</Embed-StripVersion>
+ <Include-Resource>lib=${project.build.directory}/lib</Include-Resource>
+ <Import-Package>!org.apache.ivy.*,!org.bouncycastle.*,!org.scalatools.testing.*,!com.craft.*,!com.jcraft.*,!sun.misc,!org.apache.commons.vfs,!org.apache.commons.vfs.impl,!org.apache.oro.text,!org.apache.oro.text
+ .regex,*</Import-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
View
2  org.scala-ide.scala.compiler/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.scala-ide</groupId>
<artifactId>scala-toolchain-for-eclipse</artifactId>
- <version>2.10.0-SNAPSHOT</version>
+ <version>2.9.1-SNAPSHOT</version>
<relativePath>../org.scala-ide.build-toolchain/pom.xml</relativePath>
</parent>
<artifactId>org.scala-ide.scala.compiler</artifactId>
View
2  org.scala-ide.scala.library/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.scala-ide</groupId>
<artifactId>scala-toolchain-for-eclipse</artifactId>
- <version>2.10.0-SNAPSHOT</version>
+ <version>2.9.1-SNAPSHOT</version>
<relativePath>../org.scala-ide.build-toolchain/pom.xml</relativePath>
</parent>
<artifactId>org.scala-ide.scala.library</artifactId>
View
46 org.scala-ide.sdt.core/.classpath
@@ -1,12 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" output="target/classes" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="con" path="org.scala-ide.sdt.launching.SCALA_CONTAINER"/>
- <classpathentry kind="con" path="org.scala-ide.sdt.launching.SCALA_COMPILER_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
- <classpathentry kind="lib" path="lib/miglayout-3.7.4-swt.jar"/>
- <classpathentry kind="output" path="target/classes"/>
+ <classpathentry kind="src" output="target/classes" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="con" path="org.scala-ide.sdt.launching.SCALA_CONTAINER"/>
+ <classpathentry kind="con" path="org.scala-ide.sdt.launching.SCALA_COMPILER_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
+ <classpathentry kind="lib" path="lib/miglayout-3.7.4-swt.jar"/>
+ <classpathentry kind="lib" path="/org.scala-ide.sbt/lib/actions_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="/org.scala-ide.sbt/lib/api_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="/org.scala-ide.sbt/lib/cache_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="/org.scala-ide.sbt/lib/classfile_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="/org.scala-ide.sbt/lib/classpath_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="/org.scala-ide.sbt/lib/collections_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="/org.scala-ide.sbt/lib/compile_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="/org.scala-ide.sbt/lib/completion_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="/org.scala-ide.sbt/lib/control_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="/org.scala-ide.sbt/lib/discovery_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="/org.scala-ide.sbt/lib/incremental-compiler_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="/org.scala-ide.sbt/lib/interface_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="/org.scala-ide.sbt/lib/io_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="/org.scala-ide.sbt/lib/ivy_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="/org.scala-ide.sbt/lib/ivy.jar"/>
+ <classpathentry kind="lib" path="/org.scala-ide.sbt/lib/jline.jar"/>
+ <classpathentry kind="lib" path="/org.scala-ide.sbt/lib/launcher_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="/org.scala-ide.sbt/lib/launcher-interface_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="/org.scala-ide.sbt/lib/logging_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="/org.scala-ide.sbt/lib/main_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="/org.scala-ide.sbt/lib/persist_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="/org.scala-ide.sbt/lib/precompiled-2.10.0-SNAPSHOT-2_10_0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="/org.scala-ide.sbt/lib/process_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="/org.scala-ide.sbt/lib/run_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="/org.scala-ide.sbt/lib/sbinary_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="/org.scala-ide.sbt/lib/sbt_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="/org.scala-ide.sbt/lib/task-system_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="/org.scala-ide.sbt/lib/tasks_2.10.0-SNAPSHOT.jar"/>
+ <classpathentry kind="output" path="target/classes"/>
</classpath>
View
1  org.scala-ide.sdt.core/META-INF/MANIFEST.MF
@@ -42,6 +42,7 @@ Require-Bundle:
org.scala-ide.scala.library,
org.scala-ide.scala.compiler,
org.scala-refactoring.library,
+ org.scala-ide.sbt.full.library,
scalariform,
org.junit4;bundle-version="4.5.0",
org.eclipse.ui.browser;bundle-version="3.3.0"
View
2  org.scala-ide.sdt.core/pom.xml
@@ -25,7 +25,7 @@
<scope>compile</scope>
</dependency>
</dependencies>
-
+
<build>
<plugins>
<plugin>
View
18 org.scala-ide.sdt.core/src/scala/tools/eclipse/ScalaBuilder.scala
@@ -38,11 +38,8 @@ class ScalaBuilder extends IncrementalProjectBuilder {
val project = plugin.getScalaProject(getProject)
val allSourceFiles = project.allSourceFiles()
- val dependeeProjectChanged = false
-// project.externalDepends.exists(
-// x => { val delta = getDelta(x); delta == null || delta.getKind != IResourceDelta.NO_CHANGE})
- val (addedOrUpdated, removed) = if (project.prepareBuild() || dependeeProjectChanged)
+ val (addedOrUpdated, removed) = if (project.prepareBuild())
(allSourceFiles, Set.empty[IFile])
else {
kind match {
@@ -66,6 +63,19 @@ class ScalaBuilder extends IncrementalProjectBuilder {
true
}
})
+ // Only for sbt which is able to track external dependencies properly
+ project.buildManager match {
+ case _: buildmanager.sbtintegration.EclipseSbtBuildManager =>
+ if (project.externalDepends.exists(
+ x => { val delta = getDelta(x); delta == null || delta.getKind != IResourceDelta.NO_CHANGE})) {
+ // in theory need to be able to identify the exact dependencies
+ // but this is deeply rooted inside the sbt dependency tracking mechanism
+ // so we just tell it to have a look at all the files
+ // and it will figure out the exact changes during initialization
+ addedOrUpdated0 ++= allSourceFiles
+ }
+ case _ =>
+ }
(Set.empty ++ addedOrUpdated0, Set.empty ++ removed0)
case CLEAN_BUILD | FULL_BUILD =>
(allSourceFiles, Set.empty[IFile])
View
2  org.scala-ide.sdt.core/src/scala/tools/eclipse/ScalaClasspathContainers.scala
@@ -75,4 +75,4 @@ class ScalaLibraryClasspathContainerPage extends
ScalaClasspathContainerPage(ScalaPlugin.plugin.scalaLibId,
"ScalaLibraryContainerPage",
"Scala Library Container",
- "Scala library container")
+ "Scala library container")
View
23 org.scala-ide.sdt.core/src/scala/tools/eclipse/ScalaPlugin.scala
@@ -48,6 +48,7 @@ class ScalaPlugin extends AbstractUIPlugin with IResourceChangeListener with IEl
def pluginId = "org.scala-ide.sdt.core"
def compilerPluginId = "org.scala-ide.scala.compiler"
def libraryPluginId = "org.scala-ide.scala.library"
+ def sbtPluginId = "org.scala-ide.sbt.full.library"
def wizardPath = pluginId + ".wizards"
def wizardId(name: String) = wizardPath + ".new" + name
@@ -81,12 +82,32 @@ class ScalaPlugin extends AbstractUIPlugin with IResourceChangeListener with IEl
val scalaFileExtn = ".scala"
val javaFileExtn = ".java"
val jarFileExtn = ".jar"
+
+ val sbtVersion = "0.10.1-SNAPSHOT"
+
+ private def cutVersion(version: String): String = {
+ val pattern = "(\\d)\\.(\\d+)\\..*".r
+ version match {
+ case pattern(major, minor)=>
+ major + "." + minor
+ case _ =>
+ "(unknown)"
+ }
+ }
+
+ lazy val scalaVer = scala.util.Properties.scalaPropOrElse("version.number", "(unknown)")
+ lazy val shortScalaVer = cutVersion(scalaVer)
val scalaCompilerBundle = Platform.getBundle(ScalaPlugin.plugin.compilerPluginId)
val compilerClasses = pathInBundle(scalaCompilerBundle, "/lib/scala-compiler.jar")
val continuationsClasses = pathInBundle(scalaCompilerBundle, "/lib/continuations.jar")
val compilerSources = pathInBundle(scalaCompilerBundle, "/lib/scala-compiler-src.jar")
-
+
+ lazy val sbtCompilerBundle = Platform.getBundle(ScalaPlugin.plugin.sbtPluginId)
+ lazy val sbtCompilerInterface = pathInBundle(sbtCompilerBundle, "/lib/scala-" + shortScalaVer + "/lib/compiler-interface.jar")
+ lazy val sbtScalaLib = pathInBundle(sbtCompilerBundle, "/lib/scala-" + shortScalaVer + "/lib/scala-library.jar")
+ lazy val sbtScalaCompiler = pathInBundle(sbtCompilerBundle, "/lib/scala-" + shortScalaVer + "/lib/scala-compiler.jar")
+
val scalaLibBundle = Platform.getBundle(ScalaPlugin.plugin.libraryPluginId)
val libClasses = pathInBundle(scalaLibBundle, "/lib/scala-library.jar")
val libSources = pathInBundle(scalaLibBundle, "/lib/scala-library-src.jar")
View
8 org.scala-ide.sdt.core/src/scala/tools/eclipse/ScalaProject.scala
@@ -95,7 +95,7 @@ class ScalaProject(val underlying: IProject) {
}
private var messageShowed = false
-
+
private def failedCompilerInitialization(msg: String) {
import org.eclipse.jface.dialogs.MessageDialog
synchronized {
@@ -404,7 +404,7 @@ class ScalaProject(val underlying: IProject) {
private def buildManagerInitialize: String =
storage.getString(SettingConverterUtil.convertNameToProperty(util.ScalaPluginSettings.buildManager.name))
- private def storage = {
+ def storage = {
val workspaceStore = ScalaPlugin.plugin.getPreferenceStore
val projectStore = new PropertyStore(underlying, workspaceStore, plugin.pluginId)
val useProjectSettings = projectStore.getBoolean(SettingConverterUtil.USE_PROJECT_SETTINGS_PREFERENCE)
@@ -481,8 +481,8 @@ class ScalaProject(val underlying: IProject) {
case "refined" =>
println("BM: Refined Build Manager")
buildManager0 = new buildmanager.refined.EclipseRefinedBuildManager(this, settings)
- case "sbt0.9" =>
- println("BM: SBT 0.9 enhanced Build Manager")
+ case "sbt" =>
+ println("BM: SBT 0.10.1 enhanced Build Manager for " + ScalaPlugin.plugin.scalaVer + " Scala library")
buildManager0 = new buildmanager.sbtintegration.EclipseSbtBuildManager(this, settings)
case _ =>
println("Invalid build manager choice '" + choice + "'. Setting to (default) refined build manager")
View
24 org.scala-ide.sdt.core/src/scala/tools/eclipse/buildmanager/BuildReporter.scala
@@ -4,15 +4,20 @@ import scala.tools.eclipse.{EclipseBuildManager, TaskScanner, ScalaProject}
import scala.tools.nsc.Settings
import scala.tools.nsc.reporters.Reporter
-import scala.tools.nsc.util.Position
+import scala.tools.nsc.util.{ Position, NoPosition }
import scala.tools.eclipse.util.{ EclipseResource, FileUtils, Logger }
+import scala.collection.mutable.ListBuffer
+
import org.eclipse.core.resources.{ IFile, IMarker }
import org.eclipse.core.runtime.IProgressMonitor
+case class BuildProblem(severity: Reporter#Severity, msg: String, pos: Position)
+
abstract class BuildReporter(project0: ScalaProject, settings0: Settings) extends Reporter with Logger {
- val buildManager: EclipseBuildManager
-
+ val buildManager: EclipseBuildManager
+ val prob: ListBuffer[BuildProblem] = ListBuffer.empty
+
val taskScanner = new TaskScanner(project0)
override def info0(pos : Position, msg : String, severity : Severity, force : Boolean) = {
@@ -43,9 +48,11 @@ abstract class BuildReporter(project0: ScalaProject, settings0: Settings) extend
// this may happen if a file was compileLate by the build compiler
// for instance, when a source file (on the sourcepath) is newer than the classfile
// the compiler will create PlainFile instances in that case
+ prob += new BuildProblem(severity, msg, pos)
FileUtils.buildError(i, eclipseSeverity, msg, pos.point, length, pos.line, null)
case _ =>
log("no EclipseResource associated to %s [%s]".format(f.path, f.getClass))
+ prob += new BuildProblem(severity, msg, NoPosition)
project0.buildError(eclipseSeverity, msg, null)
}
}
@@ -56,10 +63,12 @@ abstract class BuildReporter(project0: ScalaProject, settings0: Settings) extend
// print only to console, better debugging
log("[Buildmanager info] " + msg)
case _ =>
- project0.buildError(eclipseSeverity, msg, null)
+ prob += new BuildProblem(severity, msg, NoPosition)
+ project0.buildError(eclipseSeverity, msg, null)
}
} catch {
case ex : UnsupportedOperationException =>
+ prob += new BuildProblem(severity, msg, NoPosition)
project0.buildError(eclipseSeverity, msg, null)
}
}
@@ -77,4 +86,9 @@ abstract class BuildReporter(project0: ScalaProject, settings0: Settings) extend
}
}
}
-}
+
+ override def reset() {
+ super.reset()
+ prob.clear()
+ }
+}
View
1  org.scala-ide.sdt.core/src/scala/tools/eclipse/buildmanager/refined/EclipseRefinedBuildManager.scala
@@ -13,6 +13,7 @@ import scala.tools.nsc.io.AbstractFile
import scala.tools.nsc.reporters.Reporter
import scala.tools.eclipse.util.{ EclipseResource, FileUtils }
+
import org.eclipse.core.runtime.{ SubMonitor, IPath, Path }
class EclipseRefinedBuildManager(project: ScalaProject, settings0: Settings)
View
155 org.scala-ide.sdt.core/src/scala/tools/eclipse/buildmanager/sbtintegration/AnalysisCompile.scala
@@ -0,0 +1,155 @@
+package scala.tools.eclipse.buildmanager.sbtintegration
+
+import sbt.{Logger, IO, CompileSetup, CompileOptions,
+ ClasspathOptions, CompileOrder}
+import sbt.inc.{AnalysisFormats, AnalysisStore, Analysis,
+ FileBasedStore, Locate, IncrementalCompile,
+ Stamps, Stamp, ReadStamps, Incremental}
+import sbt.compiler.{JavaCompiler, CompilerArguments}
+import sbt.classpath.ClasspathUtilities
+
+import xsbti.{AnalysisCallback, Reporter, Controller}
+import xsbti.api.{Source}
+import xsbt.{InterfaceCompileFailed}
+
+import CompileOrder.{JavaThenScala, Mixed, ScalaThenJava}
+
+import sbinary.DefaultProtocol.{ immutableMapFormat, immutableSetFormat, StringFormat }
+
+import scala.collection.Seq
+import scala.tools.nsc.io.AbstractFile
+import scala.tools.eclipse.util.EclipseResource
+
+import java.io.File
+
+class CompilerArgsConstr {
+ def apply(sources: Seq[File], out: File, classpath: Seq[File]): Seq[String] = {
+ param("-d", abs(out).toString) ++ debugSbt ++ param("-classpath", classpath.map(_.toString).mkString(":")) ++ abs(sources)
+ }
+
+ private def debugSbt: Seq[String] = Seq("-Dxsbt.inc.debug=true")
+ private def param(name: String, value: String): Seq[String] = Seq(name, value)
+
+ private def abs(files: Seq[File]) = files.map(_.getAbsolutePath).sortWith(_ < _)
+ private def abs(file: File) = file.getAbsolutePath
+}
+
+class AnalysisCompile (conf: BasicConfiguration, bm: EclipseSbtBuildManager, contr: Controller) {
+ import AnalysisFormats._
+ private lazy val store = AnalysisStore.sync(AnalysisStore.cached(FileBasedStore(conf.cacheDirectory)))
+
+ private def withBootclasspath(args: CompilerArguments, classpath: Seq[File]): Seq[File] =
+ args.bootClasspath ++ args.finishClasspath(classpath)
+
+ implicit def toAbstractFile(files: Seq[File]): Set[AbstractFile] =
+ files.flatMap(f => EclipseResource.fromString(f.getPath)).toSet
+
+ def doCompile(scalac: ScalaSbtCompiler, javac: JavaCompiler,
+ sources: Seq[File], reporter: Reporter,
+ compOptions: Seq[String] = Nil, javaSrcBases: Seq[File] = Nil,
+ javacOptions: Seq[String] = Nil, compOrder: CompileOrder.Value = Mixed,
+ analysisMap: Map[File, Analysis] = Map.empty, maxErrors: Int = 100)(implicit log: EclipseLogger): Analysis = {
+
+ val currentSetup = new CompileSetup(conf.outputDirectory, new CompileOptions(compOptions, javacOptions),
+ scalac.scalaInstance.actualVersion, Mixed)
+ import currentSetup._
+
+ val getAnalysis = analysisMap.get _
+ val getAPI = (f: File) => {
+ val extApis = getAnalysis(f) match { case Some(a) => a.apis.external; case None => Map.empty[String, Source] }
+ extApis.get _
+ }
+ val apiOption = (api: Either[Boolean, Source]) => api.right.toOption
+ val compArgs = new CompilerArguments(scalac.scalaInstance, scalac.cp)
+ val searchClasspath = withBootclasspath(compArgs, conf.classpath)
+ val entry = Locate.entry(searchClasspath, Locate.definesClass) // use default defineClass for now
+
+ val (previousAnalysis, previousSetup) = extract(store.get)
+
+ val compile0 = (include: Set[File], callback: AnalysisCallback) => {
+ IO.createDirectory(conf.outputDirectory)
+ val incSrc = sources.filter(include)
+ println("Compiling:\n\t" + incSrc.mkString("\n\t"))
+ bm.buildingFiles(toAbstractFile(incSrc))
+ val (javaSrcs, scalaSrcs) = incSrc partition javaOnly
+
+ var scalaError: Option[xsbti.CompileFailed] = None
+
+ def throwLater() {
+ scalaError match {
+ case Some(err) => throw err
+ case _ => ()
+ }
+ }
+
+ def compileScala() =
+ if(!scalaSrcs.isEmpty) {
+ val sources0 = if(order == Mixed) incSrc else scalaSrcs
+ val arguments = compArgs(sources0, conf.classpath, conf.outputDirectory, options.options)
+ try {
+ scalac.compile(arguments, callback, maxErrors, log, contr)
+ } catch {
+ case err: xsbti.CompileFailed =>
+ scalaError = Some(err)
+ }
+ }
+ def compileJava() =
+ if(!javaSrcs.isEmpty) {
+ import sbt.Path._
+ val loader = ClasspathUtilities.toLoader(conf.classpath, scalac.scalaInstance.loader)
+ def readAPI(source: File, classes: Seq[Class[_]]) { callback.api(source, sbt.ClassToAPI(classes)) }
+
+ sbt.classfile.Analyze(conf.outputDirectory, javaSrcs, log)(callback, loader, readAPI) {
+ javac(javaSrcs, conf.classpath, conf.outputDirectory, options.javacOptions)
+ log.flush()
+ }
+ }
+
+ if(order == JavaThenScala) {
+ compileJava(); compileScala()
+ throwLater()
+ } else {
+ compileScala(); compileJava()
+ // if we reached here, then it might be that compiling scala files failed but java succeded
+ // it might be the case that we just want to proceed with compiling java files when scala succeded
+ // this is still something that needs to be settled (in the latter case we won't see errors for java files)
+ throwLater()
+ }
+ }
+
+ try {
+ import CompileSetup._
+
+ val analysis = previousSetup match {
+ case Some(previous) if equivCompileSetup.equiv(previous, currentSetup) => previousAnalysis
+ case _ => Incremental.prune(sources.toSet, previousAnalysis)
+ }
+
+ val (modified, result) : (Boolean, Analysis) =
+ IncrementalCompile(sources.toSet, entry, compile0, analysis, getAnalysis, conf.outputDirectory, log)
+
+ // Store if necessary
+ //println("Modified: " + modified + " Analysis: " + result + " apis " + result.apis)
+ if (modified) {
+ store.set(result, currentSetup)
+ }
+ result
+ } catch {
+ case e: xsbti.CompileFailed =>
+ null
+ } finally {
+ log.flush()
+ }
+ }
+
+ private def extract(previous: Option[(Analysis, CompileSetup)]): (Analysis, Option[CompileSetup]) =
+ previous match {
+ case Some((an, setup)) =>
+// println("restore previous setup")
+ (an, Some(setup))
+ case None =>
+// println("previous step")
+ (Analysis.Empty, None)
+ }
+ def javaOnly(f: File) = f.getName.endsWith(".java")
+}
View
386 org.scala-ide.sdt.core/src/scala/tools/eclipse/buildmanager/sbtintegration/EclipseSbtBuildManager.scala
@@ -4,23 +4,387 @@ package sbtintegration
import scala.tools.nsc.{Global, Settings}
import scala.tools.nsc.io.AbstractFile
+import scala.tools.nsc.util.{ Position, NoPosition, FakePos }
+import scala.tools.nsc.reporters.Reporter
+
+import scala.collection.mutable
import org.eclipse.core.resources.{ IFile, IMarker }
-import org.eclipse.core.runtime.{ IProgressMonitor, SubMonitor }
+import org.eclipse.core.runtime.{ IProgressMonitor, IPath, SubMonitor, Path}
+
+import java.io.File
+
+import xsbti.Maybe
+import xsbti.Controller
+import sbt.compiler.{JavaCompiler}
+import sbt.{Process, ClasspathOptions}
+
+import scala.tools.eclipse.util.{ EclipseResource, FileUtils }
+
+// The following code is based on sbt.AggressiveCompile
+// Copyright 2010 Mark Harrah
+
+private object SbtConverter {
+ // This piece of code is directly copied from sbt sources. There
+ // doesn't seem to be other way atm to convert between sbt and scala compiler reporting
+ private[this] def o[T](t: Option[T]): Option[T] = t
+ private[this] def o[T](t: T): Option[T] = Some(t)
+
+
+ def convertToSbt(posIn: Position): xsbti.Position =
+ {
+ val pos =
+ posIn match
+ {
+ case null | NoPosition => NoPosition
+ case x: FakePos => x
+ case x =>
+ posIn.inUltimateSource(o(posIn.source).get)
+ }
+ pos match
+ {
+ case NoPosition | FakePos(_) => position(None, None, None, "", None, None, None)
+ case _ => makePosition(pos)
+ }
+ }
+ def makePosition(pos: Position): xsbti.Position =
+ {
+ val srcO = o(pos.source)
+ val opt(sourcePath, sourceFile) = for(src <- srcO) yield (src.file.path, src.file.file)
+ val line = o(pos.line)
+ if(!line.isEmpty)
+ {
+ val lineContent = pos.lineContent.stripLineEnd
+ val offsetO = o(pos.offset)
+ val opt(pointer, pointerSpace) =
+ for(offset <- offsetO; src <- srcO) yield
+ {
+ val pointer = offset - src.lineToOffset(src.offsetToLine(offset))
+ val pointerSpace = ((lineContent: Seq[Char]).take(pointer).map { case '\t' => '\t'; case x => ' ' }).mkString
+ (pointer, pointerSpace)
+ }
+ position(sourcePath, sourceFile, line, lineContent, offsetO, pointer, pointerSpace)
+ }
+ else
+ position(sourcePath, sourceFile, line, "", None, None, None)
+ }
+ private[this] object opt
+ {
+ def unapply[A,B](o: Option[(A,B)]): Some[(Option[A], Option[B])] =
+ Some(o match
+ {
+ case Some((a,b)) => (Some(a), Some(b))
+ case None => (None, None)
+ })
+ }
+ private[this] def position(sourcePath0: Option[String], sourceFile0: Option[File], line0: Option[Int], lineContent0: String, offset0: Option[Int], pointer0: Option[Int], pointerSpace0: Option[String]) =
+ new xsbti.Position
+ {
+ val line = o2mi(line0)
+ val lineContent = lineContent0
+ val offset = o2mi(offset0)
+ val sourcePath = o2m(sourcePath0)
+ val sourceFile = o2m(sourceFile0)
+ val pointer = o2mi(pointer0)
+ val pointerSpace = o2m(pointerSpace0)
+ }
+
+ import xsbti.Severity.{Info, Warn, Error}
+ def convertToSbt(sev: Reporter#Severity, reporter: Reporter): xsbti.Severity = {
+ import reporter. { INFO, WARNING, ERROR }
+ sev match
+ {
+ case INFO => Info
+ case WARNING => Warn
+ case ERROR => Error
+ }
+ }
+
+ import java.lang.{Integer => I}
+ private[this] def o2mi(opt: Option[Int]): Maybe[I] = opt match { case None => Maybe.nothing[I]; case Some(s) => Maybe.just[I](s) }
+ private[this] def o2m[S](opt: Option[S]): Maybe[S] = opt match { case None => Maybe.nothing[S]; case Some(s) => Maybe.just(s) }
+}
+
+private class SbtBuildReporter(underlying: BuildReporter) extends xsbti.Reporter {
+ import scala.tools.nsc.util.{BatchSourceFile, OffsetPosition}
+ import scala.tools.nsc.io.AbstractFile
+
+ def toXsbtProblem(p: BuildProblem): xsbti.Problem =
+ new xsbti.Problem {
+ def severity() = SbtConverter.convertToSbt(p.severity, underlying)
+ def message() = p.msg
+ def position() = SbtConverter.convertToSbt(p.pos)
+ }
+
+ implicit def toScalaPosition(pos0: xsbti.Position): Position = {
+ val srcpath0 = pos0.sourcePath()
+ val srcfile0 = pos0.sourceFile()
+ val offset0 = pos0.offset()
+ (srcpath0.isDefined(), srcfile0.isDefined(), offset0.isDefined()) match {
+ case (false, false, false) =>
+ NoPosition
+ case _ =>
+ val ifile = EclipseResource.fromString(srcpath0.get)
+ ifile match {
+ case None =>
+ NoPosition
+ case Some(ifile0) =>
+ val sourceFile = new BatchSourceFile(ifile0)
+ val offset = offset0.get.intValue
+ new OffsetPosition(sourceFile, offset)
+ }
+ }
+ }
+
+ def reset() = underlying.reset
+ def hasErrors() = underlying.hasErrors
+ def hasWarnings() = underlying.hasWarnings
+ def printSummary() {} //TODO
+ def problems: Array[xsbti.Problem] = underlying.prob.map(toXsbtProblem).toArray
+
+ def log(pos: xsbti.Position, msg: String, sev: xsbti.Severity) {
+ import xsbti.Severity.{Info, Warn, Error}
+ sev match
+ {
+ case Info => underlying.info(pos, msg, false)
+ case Warn => underlying.warning(pos, msg)
+ case Error => underlying.error(pos, msg)
+ }
+ }
+}
+
+
+trait EclipseLogger extends sbt.Logger {
+ def flush(): Unit
+}
+
+class SbtBuildLogger(underlying: BuildReporter) extends EclipseLogger {
+ // This needs to be improved but works for most of the java errors
+ val javaErrorBegin = ".*\\.java:(\\d+):.*".r
+ val buff = mutable.ListBuffer[Tuple2[sbt.Level.Value, String]]()
+ def trace(t: => Throwable) {
+ // ignore for now?
+ }
+ def success(message: => String) { }
+ def log(level: sbt.Level.Value, message: => String) {
+ import sbt.Level.{Info, Warn, Error, Debug}
+ level match {
+ case Info => ()
+ case Warn => buff += ((level, message)) //underlying.warning(NoPosition, message)
+ case Error => buff += ((level, message)) //underlying.error(NoPosition, message)
+ case Debug => ()
+ }
+ }
+
+
+ // This will at least ensure that we print log in the order required by eclipse for java problems
+ // This is a temporary solution until the parsing of java error/warning messages is done correctly
+ def flush() {
+ def publishMsg(level: sbt.Level.Value, msg: String) = {
+ level match {
+ case sbt.Level.Warn =>
+ underlying.warning(NoPosition, msg)
+ case sbt.Level.Error =>
+ underlying.error(NoPosition, msg)
+ }
+ }
+ import scala.collection
+ val localBuff = new mutable.ListBuffer[String]()
+ val buff0 = buff.dropRight(1) // remove number of error message
+ var lastLevel: sbt.Level.Value = null
+ buff0.foreach(msg => {
+ val res = msg._2 match { case javaErrorBegin(_) => true; case _ => false }
+
+ if ((msg._1 != lastLevel || res) && !localBuff.isEmpty) {
+ assert(lastLevel != null)
+ publishMsg(lastLevel, localBuff.mkString("\n"))
+ localBuff.clear()
+ }
+ lastLevel = msg._1
+ localBuff.append(msg._2)
+ })
+ if (!localBuff.isEmpty)
+ publishMsg(lastLevel, localBuff.mkString("\n"))
+ }
+}
+
+object SettingsUnParser {
+ def apply(s: Settings): Seq[String] = {
+ val disallowed = Set(s.d, s.Ybuildmanagerdebug, s.Ybuilderdebug, s.sourcepath, s.sourcedir,
+ s.YpresentationDebug, s.YpresentationDelay, s.YpresentationLog,
+ s.YpresentationReplay, s.YpresentationVerbose,
+ s.classpath)
+
+ val set = s.userSetSettings -- disallowed
+
+ set.toList flatMap (_.unparse)
+ }
+}
+
-// Temporary stub for future sbt integration
class EclipseSbtBuildManager(project: ScalaProject, settings0: Settings)
extends EclipseBuildManager {
+
+ var monitor: SubMonitor = _
+
+ class SbtProgress extends Controller {
+ private var lastWorked = 0
+ private var savedTotal = 0
+ private var throttledMessages = 0
+
+ // Direct copy of the mechanism in the refined build managers
+ def runInformUnitStarting(phaseName: String, unitPath: String) {
+ throttledMessages += 1
+ if (throttledMessages == 10) {
+ throttledMessages = 0
+ val unitIPath: IPath = Path.fromOSString(unitPath)
+ val projectPath = project.javaProject.getProject.getLocation
+ monitor.subTask("phase " + phaseName + " for " + unitIPath.makeRelativeTo(projectPath))
+ }
+ }
+
+ def runProgress(current: Int, total: Int): Boolean =
+ if (monitor.isCanceled) {
+ false
+ } else {
+ if (savedTotal != total) {
+ monitor.setWorkRemaining(total - savedTotal)
+ savedTotal = total
+ }
+
+ if (lastWorked < current) {
+ monitor.worked(current - lastWorked)
+ lastWorked = current
+ }
+ true
+ }
+ }
- var depFile: IFile = null
- var compiler = null
+ /** Not supported */
+ val compiler = null
+ var depFile: IFile = null
+
+ private[sbtintegration] lazy val _buildReporter = new BuildReporter(project, settings0) {
+ val buildManager = EclipseSbtBuildManager.this
+ }
+
+ lazy val reporter: xsbti.Reporter = new SbtBuildReporter(_buildReporter)
+ val pendingSources = new mutable.HashSet[IFile]
+
+ private def filterOutScalaJars(l: Seq[IPath]): Seq[IPath] = {
+ val jars = l.partition(p => p.lastSegment() == ScalaCompilerConf.LIBRARY_SUFFIX || p.lastSegment() == ScalaCompilerConf.COMPILER_SUFFIX)
+ jars._2
+ }
+
+ lazy val scalaVersion = {
+ // For the moment fixed to 2.9.0
+ ScalaPlugin.plugin.scalaVer
+ }
+
+ def compilers(settings: Settings, libJar: File, compJar:File, compInterfaceJar: File): (ScalaSbtCompiler, JavaCompiler) = {
+ val scalacInstance = ScalaCompilerConf(scalaVersion, libJar, compJar, compInterfaceJar)
+ val scalac = new ScalaSbtCompiler(settings,
+ scalacInstance,
+ ClasspathOptions.auto,
+ reporter)
+ val javac = JavaCompiler.directOrFork(scalac.cp, scalac.scalaInstance)( (args: Seq[String], log: sbt.Logger) => Process("javac", args) ! log )
+ (scalac, javac)
+ }
+
+ //implicit val conLogger = sbt.ConsoleLogger()
+ implicit val sbtBuildLogger = new SbtBuildLogger(_buildReporter)
+ implicit def toFile(files: mutable.Set[AbstractFile]): Seq[File] = files.map(_.file).toSeq
+ implicit def toFile(files: scala.collection.Set[AbstractFile]): Seq[File] = files.map(_.file).toSeq
+
+ private val sources: mutable.Set[AbstractFile] = mutable.Set.empty
+
+ /** Add the given source files to the managed build process. */
+ def addSourceFiles(files: scala.collection.Set[AbstractFile]) {
+ if (!files.isEmpty) {
+ sources ++= files
+ runCompiler(sources)
+ }
+ }
+
+ /** Remove the given files from the managed build process. */
+ def removeFiles(files: scala.collection.Set[AbstractFile]) {
+ if (!files.isEmpty)
+ sources --= files
+ }
+
+ /** The given files have been modified by the user. Recompile
+ * them and their dependent files.
+ */
+ def update(added: scala.collection.Set[AbstractFile], removed: scala.collection.Set[AbstractFile]) {
+ println("update files: " + added)
+ if (!added.isEmpty || !removed.isEmpty) {
+ removeFiles(removed)
+ sources ++= added
+ runCompiler(sources)
+ }
+ }
+
+ private def runCompiler(sources: Seq[File]) {
+ // setup the settings
+ val restJars = filterOutScalaJars(project.classpath)
+ // Fixed 2.9 for now
+ val libJar = ScalaPlugin.plugin.sbtScalaLib
+ val compJar = ScalaPlugin.plugin.sbtScalaCompiler
+ // TODO pull the actual version from properties and select the correct one
+ val compInterfaceJar = ScalaPlugin.plugin.sbtCompilerInterface
+
+ val (scalac, javac) = compilers(settings0, libJar.get.toFile, compJar.get.toFile, compInterfaceJar.get.toFile)
+ // read settings properly
+ //val cp = disintegrateClasspath(settings.classpath.value)
+ val cp = restJars.map(_.toFile)
+ val conf = new BasicConfiguration(
+ project, Seq(scalac.scalaInstance.libraryJar, compInterfaceJar.get.toFile) ++ cp)
+
+ val analysisComp = new AnalysisCompile(conf, this, new SbtProgress())
+ val result = analysisComp.doCompile(
+ scalac, javac, sources, reporter, SettingsUnParser(settings0))
+ }
+
+ /** Not supported */
def loadFrom(file: AbstractFile, toFile: String => AbstractFile) : Boolean = true
+
+ /** Not supported */
def saveTo(file: AbstractFile, fromFile: AbstractFile => String) {}
- def removeFiles(files: scala.collection.Set[AbstractFile]) {}
- def addSourceFiles(files: scala.collection.Set[AbstractFile]) {}
- def update(added: scala.collection.Set[AbstractFile], removed: scala.collection.Set[AbstractFile]) {}
- def build(addedOrUpdated: Set[IFile], removed: Set[IFile], monitor: SubMonitor): Unit = {}
- def clean(implicit monitor: IProgressMonitor) {}
- def invalidateAfterLoad: Boolean = false
-}
+
+ def clean(implicit monitor: IProgressMonitor) {} // Should remove .cache and output directory
+ def invalidateAfterLoad: Boolean = true
+
+
+ private def unbuilt: Set[AbstractFile] = Set.empty // TODO: this should be taken care of
+
+ def build(addedOrUpdated : Set[IFile], removed : Set[IFile], pm: SubMonitor) {
+ _buildReporter.reset()
+ pendingSources ++= addedOrUpdated
+ val removedFiles = removed.map(EclipseResource(_) : AbstractFile)
+ val toBuild = pendingSources.map(EclipseResource(_)) ++ unbuilt -- removedFiles
+ monitor = pm
+ hasErrors = false
+ try {
+ update(toBuild, removedFiles)
+ } catch {
+ case e =>
+ hasErrors = true
+ project.buildError(IMarker.SEVERITY_ERROR, "Error in Scala compiler: " + e.getMessage, null)
+ ScalaPlugin.plugin.logError("Error in Scala compiler", e)
+ }
+ if (!hasErrors)
+ pendingSources.clear
+ }
+
+ override def buildingFiles(included: scala.collection.Set[AbstractFile]) {
+ for(file <- included) {
+ file match {
+ case EclipseResource(f : IFile) =>
+ FileUtils.clearBuildErrors(f, null)
+ FileUtils.clearTasks(f, null)
+ case _ =>
+ }
+ }
+ }
+}
View
79 org.scala-ide.sdt.core/src/scala/tools/eclipse/buildmanager/sbtintegration/SbtConf.scala
@@ -0,0 +1,79 @@
+package scala.tools.eclipse
+package buildmanager
+package sbtintegration
+
+import sbt.{ ScalaInstance, Path }
+import xsbt.boot.{Launcher, Repository } // TODO get rid of this dependency
+import java.io.File
+import org.eclipse.core.resources.ResourcesPlugin
+
+object ScalaCompilerConf {
+ val LIBRARY_SUFFIX = "scala-library.jar"
+ val COMPILER_SUFFIX = "scala-compiler.jar"
+ private val _bootdir = (new File("")).getAbsoluteFile
+
+ def apply(scalaHome: File): ScalaInstance = {
+ val launcher = Launcher(_bootdir, Nil)
+ ScalaInstance(scalaHome, launcher)
+ }
+
+ def apply(libraryJar: File, compilerJar: File): ScalaInstance = {
+ val repo:List[Repository] = List(Repository.Predefined.apply(Repository.Predefined.Local))
+ val launcher = Launcher(_bootdir, repo)
+ ScalaInstance(libraryJar, compilerJar, launcher)
+ }
+
+ def apply(version: String, libraryJar: File, compilerJar: File, extraJar: File): ScalaInstance = {
+ val repo:List[Repository] = List(Repository.Predefined.apply(Repository.Predefined.Local))
+ val launcher = Launcher(_bootdir, repo)
+ ScalaInstance(version, libraryJar, compilerJar, launcher, extraJar)
+ }
+
+ def apply(version: String, eclipsePluginDir: File): ScalaInstance = {
+ val launcher = Launcher(_bootdir, Nil)
+ val libraryJar = findJar(eclipsePluginDir, LIBRARY_SUFFIX, version)
+ val compilerJar = findJar(eclipsePluginDir, COMPILER_SUFFIX, version)
+ //val libraryJar = ScalaPlugin.plugin.sbtScalaLib
+ //val compilerJar = ScalaPlugin.plugin.sbtScalaCompiler
+ ScalaInstance(libraryJar, compilerJar, launcher)
+ }
+
+ private def findJar(dir: File, prefix: String, version: String):File = {
+ new File(dir, prefix + version + ".jar")
+ }
+}
+
+class BasicConfiguration(
+ val project: ScalaProject,
+ val classpath: Seq[File]
+ // If I put default None here, I get NPE
+ // outputDir:Option[File]
+ ) {
+ import Path._
+
+ private final val cacheSuffix = ".cache"
+ private final val outSuffix = "target"
+ def cacheDirectory: File = {
+ outputDirectory / cacheSuffix
+ }
+
+ def outputDirectory: File = {
+ val outDirs = project.outputFolders.toList
+ outDirs match {
+ case List(out) =>
+ val root = ResourcesPlugin.getWorkspace().getRoot()
+ val ifolder = root.getFolder(out)
+ ifolder.getLocation().toFile
+ case _ =>
+ project.underlying.getLocation().toFile / "default-bin"
+ }
+ }
+
+ def classesDirectory: File = {
+ outputDirectory
+ }
+
+ def fullClasspath: Seq[File] = {
+ Seq(classesDirectory) ++ classpath
+ }
+}
View
21 org.scala-ide.sdt.core/src/scala/tools/eclipse/buildmanager/sbtintegration/ScalaSbtCompiler.scala
@@ -0,0 +1,21 @@
+package scala.tools.eclipse.buildmanager.sbtintegration
+
+import scala.tools.nsc.Settings
+
+import sbt.{ScalaInstance, LoggerReporter, ClasspathOptions}
+import xsbti.{AnalysisCallback, Reporter, Logger, Controller}
+
+/*
+ * In comparison to sbt.compile.AnalyzingCompiler we only need a single version of the scala compiler to support ATM.
+ * So this is a simplified interface for the compiler that doesn't need dual loader.
+ * But in the near future this will use a dual loader.
+ */
+class ScalaSbtCompiler(val settings: Settings,
+ val scalaInstance: ScalaInstance,
+ val cp: ClasspathOptions,
+ reporter: Reporter) {
+ def compile(args: Seq[String], callback: AnalysisCallback, maxErrors:Int, log: Logger, contr: Controller) {
+ val cInterface = new xsbt.CompilerInterface
+ cInterface.run(args.toArray[String], callback, log, reporter, contr)
+ }
+}
View
2  org.scala-ide.sdt.core/src/scala/tools/eclipse/properties/CompilerSettings.scala
@@ -46,7 +46,7 @@ trait ScalaPluginPreferencePage {
else {
val value = setting match {
case ms : Settings#MultiStringSetting => ms.value.mkString(" ")
- case setting => setting.value.toString
+ case setting => setting.value.toString
}
store.setValue(name, value)
}
View
15 org.scala-ide.sdt.core/src/scala/tools/eclipse/util/IDESettings.scala
@@ -8,8 +8,10 @@ package scala.tools.eclipse.util
import scala.tools.nsc.Settings
object IDESettings {
+
import ScalaPluginSettings._
case class Box(name: String, userSettings: List[Settings#Setting])
+
def shownSettings(s : Settings) : List[Box] = {
import s._
@@ -30,16 +32,15 @@ object IDESettings {
List(YpresentationDebug, YpresentationVerbose, YpresentationLog, YpresentationReplay, YpresentationDelay)))
}
- def pluginSettings: List[Box] = {
- List(Box("Scala Plugin Debugging", List(YPlugininfo)))
- }
+ def pluginSettings: List[Box] =
+ List(Box("Scala Plugin Debugging", List(YPlugininfo)))
- def buildManagerSettings: List[Box] = {
- List(Box("Build manager", List(buildManager)))
- }
+ def buildManagerSettings: List[Box] =
+ List(Box("Build manager", List(buildManager)))
}
object ScalaPluginSettings extends Settings {
val YPlugininfo = BooleanSetting("-plugininfo", "Enable logging of the Scala Plugin info")
- val buildManager = ChoiceSetting("-buildmanager", "which", "Build manager to use", List("refined"), "refined")
+ val buildManager = ChoiceSetting("-buildmanager", "which", "Build manager to use", List("refined", "sbt"), "refined")
+
}
View
7 org.scala-ide.sdt.feature/feature.xml
@@ -126,5 +126,12 @@ SUCH DAMAGE.
install-size="0"
version="0.0.0"
unpack="false"/>
+
+ <plugin
+ id="org.scala-ide.sbt.full.library"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
</feature>
Please sign in to comment.
Something went wrong with that request. Please try again.