IntelliJ scala控制台,交互式开发
我刚刚开始在 Scala 中“编码”,来自 F#,我试图找到一种拥有类似环境的方法。
目前我正在使用 IntelliJ 10.0.2。使用 Scala 插件。在任何给定的项目上,我尝试设置以下内容:
- 打开时,scala 控制台加载项目的外部库(这有效)
- 加载代码正在开发的文件的命令/方式。例如,您在项目中定义了一些想要测试的模块,因此您可以在控制台中执行诸如加载“module1.scala”、加载“module2.scala”等操作。
这可能吗?
注意:
- com.intellij.rt.execution.application.AppMain.org.jetbrains.plugins.scala.compiler.rt.ConsoleRunner 似乎加载了所有外部库
- 似乎有一个函数 :load 但当我提供它时它返回的参数“文件不存在”)实际上只是一个愚蠢的错误,使用 C: 而不是 c:
非常感谢
I have just started "coding" in Scala, coming from F# I am trying to find a way to have a similar environement.
Currently I am using IntelliJ 10.0.2. with the Scala plugin. On any given project I am trying to set up the following:
- When opened the scala console loads the external libraries of the project ( this works )
- A command/way to load the files where code is under developement. For instance you define a few modules in your project that you would like to test, so you would do something like load "module1.scala", load"module2.scala" etc.. in the console.
Is this possible?
Note:
- com.intellij.rt.execution.application.AppMain.org.jetbrains.plugins.scala.compiler.rt.ConsoleRunner seems to load all the external libraries
- there seems to be a function :load but when I supply it arguments it returns "file does not exist") actually was just a silly mistake was using C: instead of c:
Many thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
谷歌搜索idea的sbt插件。 SBT(简单构建工具)是 Scala 的交互式构建工具。它有一个“控制台”命令,可以在启动时加载依赖项和您的类。 SBT 还提供其他好处。 idea 插件可以让你同时使用两者。
Google for the sbt plugin for idea. SBT (Simple Build Tool) is an interactive build tool for Scala. It has a "console" command that loads the dependencies and your classes when it starts up. SBT offers other goodies, as well. The idea plugin lets you use the two together.
这是不可能像 IntelliJ IDEA 那样的功能。
您可以将适当的问题添加到 Scala 插件问题跟踪器: http://youtrack.jetbrains.net/issues/SCL< /a>.
It's not possible like IntelliJ IDEA feature.
You can add appropriate issue to Scala plugin issue tracker: http://youtrack.jetbrains.net/issues/SCL.