Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open SBT Tool Window in Intellij?

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)?

like image 991
DorianOlympia Avatar asked Sep 03 '15 11:09

DorianOlympia


People also ask

Why sbt is not showing in IntelliJ?

In Intellij 2018, under Preferences - Build, Execution, Deployment - Build Tools - sbt , check " Use sbt shell for build and import (requires sbt 0.13. 5+) ". Then restart Intellij. The sbt shell tool window tab will appear in the bottom pane (if not, select it from View - Tool Windows - sbt shell ).

Where is Plugins sbt in IntelliJ?

IntelliJ plugin can be found here http://confluence.jetbrains.com/display/SCA/Scala+Plugin+for+IntelliJ+IDEA or can be installed directoly from within the IDE using Settings -> Plugins dialog. Afterwards one can just do File -> New Project -> Scala -> SBT based. IntelliJ will generate basic build.

How do I run an sbt Assembly in IntelliJ?

IntelliJ now allows you to create a run configuration for an SBT task. You create the Run Configuration by : choosing "Edit configurations" from the "Run" menu (or the toolbar popup) click the "+" button to add a configuration and select "SBT Task" as the type of configuration you want to make.


2 Answers

In Menu: View -> Tool Windows there should be two entries:

  1. SBT
  2. SBT Console

The first you can use to refresh IDEA project structure from SBT and view dependencies.

The second gives you a console where you can run sbt commands.

Update:

As Justin already aded:

As of IntelliJ IDEA 2017.1 Build #IC-171.3780.52 there is a new and (imho) better way:

(If you are working with an SBT project, that is)

When you open the SBT Tool Window, you will find a new scala terminal icon:

enter image description here


This will open an sbt console session with your sbt project import settings.

One major benefit is that you will actually (finally) get links to your code lines for compiler warnings and errors.

like image 59
Sascha Kolberg Avatar answered Sep 25 '22 23:09

Sascha Kolberg


To be able to open SBT Console from View -> Tool Windows you first need to install the plugin required for it.

You can find the SBT plugin by searching for it under Settings -> Plugins -> Browse repositories

Plugin homepage: https://github.com/orfjackal/idea-sbt-plugin

like image 45
Răzvan Flavius Panda Avatar answered Sep 24 '22 23:09

Răzvan Flavius Panda