william007
william007

Reputation: 18545

Importing sbt to scalaIDE

I am new to scala. I have source code in the sbt structure as following:

base/lib
    /project
    /src/main
    /src/test
    /target

How should I import them to ScalaIDE (which use Eclipse)?

I tried to import the source, but no matter which folder I choose (base, src), no scala project is detected.

Upvotes: 1

Views: 121

Answers (1)

Alexey Romanov
Alexey Romanov

Reputation: 170745

Use sbteclipse. From the README:

  1. Add sbteclipse to your plugin definition file (or create one if doesn't exist). You can use either the global file (for version 0.13 and up) at ~/.sbt/0.13/plugins/plugins.sbt or the project-specific file at PROJECT_DIR/project/plugins.sbt.

    For the latest version:

    addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")
    
  2. In sbt use the command eclipse to create Eclipse project files

    > eclipse
    
  3. In Eclipse use the Import Wizard to import Existing Projects into Workspace

Upvotes: 2

Related Questions