使用 Scala IDE 中的 SBT [英] Using SBT from Scala IDE

查看:25
本文介绍了使用 Scala IDE 中的 SBT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从 SBT 到 Scala-IDE 的路径在很多地方都有很好的描述:

The path from SBT to Scala-IDE is well described in many places:

  1. 从 SBT 项目开始
  2. 添加 SBT 插件定义:addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.1.0-RC1")
  3. 在 SBT 中运行eclipse"命令
  4. 使用已安装的 Scala-IDE 插件打开 Eclipse
  5. 导入项目

这反过来又是什么?如果我在 Scala-IDE 中启动一个新项目,我可以添加一个 build.sbt 文件并以某种方式告诉 Eclipse 在运行应用程序时使用它吗?

What is the reverse for this? If I start a new project in Scala-IDE, can I just add a build.sbt file and somehow tell Eclipse to use this when running the application?

抱歉,如果这对某些人来说似乎很明显,但我最近从 ItelliJ Idea 转移到 Scala-IDE,我不确定设置 Scala-IDE 以使用 SBT 和我的 sbt 配置文件.

Apologies if this seems obvious to some, but I've recently moved from ItelliJ Idea to Scala-IDE and I'm not certain about setting up Scala-IDE to use SBT and my sbt config files.

推荐答案

不,你不能这样做.方法如你所描述.然后,每当您对 build.sbt 进行更改(例如,新的 jar 依赖项)时,从 sbt 重新运行 eclipse 命令并在 Eclipse 中刷新项目,以便重新加载新生成的文件.

No, you cannot do this. The way to do it is as you described. Then, whenever you make changes to build.sbt (e.g., new jar dependency), rerun the eclipse command from sbt and refresh the project in Eclipse so that the newly generated files are reloaded.

这篇关于使用 Scala IDE 中的 SBT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆