scala 如何在 Intellij 中打开 SBT 工具窗口?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32374193/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to open SBT Tool Window in Intellij?
提问by DorianOlympia
This question may sound silly for you, but I have been searching the Internet for a while and couldn't find the answer. How can I open SBT Tool Window in Intellij (scala and SBT plugins obviously installed)?
这个问题对你来说可能听起来很傻,但我已经在互联网上搜索了一段时间,找不到答案。如何在 Intellij 中打开 SBT 工具窗口(明显安装了 Scala 和 SBT 插件)?
回答by Sascha Kolberg
In Menu: View -> Tool Windowsthere should be two entries:
在菜单中:View -> Tool Windows应该有两个条目:
- SBT
- SBT Console
- SBT
- SBT控制台
The first you can use to refresh IDEA project structure from SBT and view dependencies.
您可以使用第一个从 SBT 刷新 IDEA 项目结构并查看依赖项。
The second gives you a console where you can run sbtcommands.
第二个为您提供了一个控制台,您可以在其中运行sbt命令。
Update:
更新:
As Justin already aded:
正如贾斯汀已经补充的那样:
As of IntelliJ IDEA 2017.1 Build #IC-171.3780.52there is a new and (imho) better way:
从IntelliJ IDEA 2017.1 Build #IC-171.3780.52 开始,有一种新的(恕我直言)更好的方法:
(If you are working with an SBT project, that is)
(如果您正在使用 SBT 项目,那就是)
When you open the SBT Tool Window, you will find a new scala terminalicon:
当您打开SBT 工具窗口时,您会发现一个新的Scala 终端图标:
This will open an sbt console session with your sbt project import settings.
这将使用您的 sbt 项目导入设置打开 sbt 控制台会话。
One major benefit is that you will actually (finally) get links to your code lines for compiler warnings and errors.
一个主要的好处是您实际上(最终)会获得指向编译器警告和错误的代码行的链接。
回答by R?zvan Flavius Panda
To be able to open SBT Consolefrom View-> Tool Windowsyou first need to install the plugin required for it.
为了能够打开SBT Console从View- >Tool Windows您首先需要安装它所需的插件。
You can find the SBT plugin by searching for it under Settings-> Plugins-> Browse repositories
您可以通过在Settings-> Plugins->下搜索来找到 SBT 插件Browse repositories
Plugin homepage: https://github.com/orfHymanal/idea-sbt-plugin
回答by Justin Kaeser
回答by Marek Dudek
In Intellij 16SBT Consolemenu item no longer exists and in Debian 7(XFCE) Alt-F12doesn't work.
在Intellij 16 SBT 控制台菜单项不再存在并且在Debian 7( XFCE)Alt-F12中不起作用。
To run SBTconsole:
运行SBT控制台:
- select
View->Tool Windows->Terminal(forAlt-F12) - type
sbtand console works
- 选择
View->Tool Windows->Terminal(为Alt-F12) - 类型
sbt和控制台工作
回答by Prasad
You can either use above or simply use Alt+F12
您可以使用上面的或简单地使用 Alt+F12


