I am using the last version of the scala ide eclipse http://scala-ide.org/
Scala IDE build of Eclipse SDK
Build id: 4.0.0-vfinal-20141216-1226-Typesafe
I have a project that I am able to run from the terminal with sbt:
donbeo@donbeo-HP-EliteBook-Folio-9470m:~/Applications/scala_workspace/progfun-quickcheck$ sbt
[info] Loading project definition from /home/donbeo/Applications/scala_workspace/progfun-quickcheck/project/project
[info] Loading project definition from /home/donbeo/Applications/scala_workspace/progfun-quickcheck/project
[info] Set current project to progfun-quickcheck (in build file:/home/donbeo/Applications/scala_workspace/progfun-quickcheck/)
> test
[info] + Heap.min1: OK, passed 100 tests.
[info] + Heap.min2: OK, passed 100 tests.
[info] + Heap.min3: OK, passed 100 tests.
[info] ! Heap.sort1: Falsified after 1 passed tests.
[info] > ARG_0: List("0")
[info] + Heap.minMeld: OK, passed 100 tests.
[info] Quic..........
I have tried to import this project to eclipse running :
ickcheck$ sbt
[info] Loading project definition from /home/donbeo/Applications/scala_workspace/progfun-quickcheck/project/project
[info] Loading project definition from /home/donbeo/Applications/scala_workspace/progfun-quickcheck/project
[info] Set current project to progfun-quickcheck (in build file:/home/donbeo/Applications/scala_workspace/progfun-quickcheck/)
> eclipse
[info] About to create Eclipse project files for your project(s).
[info] Successfully created Eclipse project files for project(s):
[info] progfun-quickcheck
>
and then I have imported the project into eclipse. When I try to run the project from eclipse I get the following error:
WARNING: -p has been deprecated and will be reused for a different (but still very cool) purpose in ScalaTest 2.0. Please change all uses of -p to -R.
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at scala.tools.eclipse.scalatest.launching.ScalaTestLauncher$.main(ScalaTestLauncher.scala:20)
at scala.tools.eclipse.scalatest.launching.ScalaTestLauncher.main(ScalaTestLauncher.scala)
Caused by: java.lang.NoSuchMethodError: scala.collection.immutable.$colon$colon.hd$1()Ljava/lang/Object;
at org.scalatest.tools.Runner$.argTooShort$1(Runner.scala:1010)
at org.scalatest.tools.Runner$.parseReporterArgsIntoConfigurations(Runner.scala:1024)
at org.scalatest.tools.Runner$.runOptionallyWithPassFailReporter(Runner.scala:627)
at org.scalatest.tools.Runner$.main(Runner.scala:573)
at org.scalatest.tools.Runner.main(Runner.scala)
... 6 more
My understanding is also that the version of ecplise that I am using should have its own sbt plugin so maybe that can make things easier.
So how can I run the project from eclipse?