Import a Scala project from github into Eclipse

I installed the EGit plugin in my Eclipse Helios with the latest beta version of the Scala IDE plugin. I imported it as a “shared project” using a clone, and I cannot find the “Configure → Add Scala” option ... what am I doing wrong? (cannot compile / run / add libraries, etc.)

+5
source share
2 answers

I am not familiar with the EGit plugin, but do you have the option to import it as a Java project? The "Add Scala Nature" option is available only for Java projects.

If you cannot create it as a Java project, you can also just modify the generated .project file and add the Java character to it:

<nature>org.eclipse.jdt.core.javanature</nature>

(taken from http://enarion.net/programming/eclipse-change-general-to-java-project/ )

+6
source

One of the recommended methods would be to first compile / run the GitHub project with sbt (which provides both IDE dependency and dependency management of third-party libraries).

sbt-eclifsify can easily generate files .classpathand .projectfor the Eclipse IDE from sbt project.
The class ProjectFile.scaladescribes in detail how the file is created .project.

0
source

All Articles