使用 Scala IDE 中的 SBT

编程入门 行业动态 更新时间:2024-10-27 02:29:41
本文介绍了使用 Scala IDE 中的 SBT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

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

  • 从 SBT 项目开始
  • 添加 SBT 插件定义:addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.1.0-RC1")
  • 在 SBT 中运行eclipse"命令
  • 使用已安装的 Scala-IDE 插件打开 Eclipse
  • 导入项目
  • 这反过来又是什么?如果我在 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

    本文发布于:2023-07-24 13:16:12,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1203669.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:Scala   IDE   SBT

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!