Create project with existing sources

Hi

Running IDEA 8471 and have tried with both the current Scala plugin release as well as the Scala Plugin trunk.

What is the recommended way to create a new project when I have existing sources in Scala? For example, I wanted to open ScalaTest (http://www.artima.com/scalatest/) as a project in IDEA. There is no Maven file or Eclipse file. I created a new Java project and during Facet detection it did propose Scala, though oddly indicated just one .scala file found.

Once opened, the project has a JDK configured (in Settings, Project JDK) named "scala", which I guess I set up at some point, but then there is a separate "Scala JDK" configured for the Scala facet. Both point to the same place but show different names ("scala (1.5)" vs. "Scala-2.7.1.final").

I tried choosing "Run All Tests" for the tests/ folder, and a Run configuration was created, but nothing lauched. Launching the Run Configuration itself did nothing. The Messages tool didn't show up, either. There are no errors in the IDEA log file. If it's not implemented yet, maybe a warning dialog, or simply disable the Run configuration?

One of my goals with the plugin is to be able to download any buildable Scala project (there are a number on Scalax, Scalaz, Google Code), set it up without much fuss, build, run tests, examine code, etc.


Thanks for making this available, and making it open-source!
Patrick

0

Hello, Patrick.

Unfortunately, possibility to run tests written on Scala is not provided yet. We have no implemented appropriate Scala-to-Java facade yet to reuse appropriate API in IDEA, created initially for Java. Of course, we will do it soon.
BTW, you can load your Acala projects in IDEA using "create from existing sources" wizard. To attach your Scala SDK you have to indicate it in Scala facet, attached to your modules. After that you can use navigation features. Also you can run your application objects (with appropriate main() method) from IDEA as they would have been Java applications.
I think separate Scala SDK in your library settings is old plugin version's legacy.legacy
Thanks for your interest.

Ilya

0

Thanks, Ilya. I'll continue to play around with it and see if I run into further problems importing external projects.


Cheers
Patrick

0

请先登录再写评论。