10

Facing some issue with the build, I deleted the project and .idea directories of my SBT project (containing submodules) followed by Invalidate Caches / Restart... (invalidated the cache too)

Ever since relaunch of IntelliJ, I can't locate the sbt shell enter image description here

Interestingly, I'm still getting the sbt shell when I open my other projects (in which I didn't delete the project and .idea directories) in IntelliJ enter image description here

I can confirm that I have the latest release of IntelliJ IDEA for MacOS with the Scala plugin installed enter image description here enter image description here

y2k-shubham
  • 10,183
  • 11
  • 55
  • 131
  • Here's the [link](https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000786124-Unable-to-find-sbt-shell) to my issue on JetBrains forums – y2k-shubham Jan 11 '18 at 05:38
  • besides shift+12, you can also try shift+ctrl/cmd+s, or action search for "sbt shell" – Justin Kaeser Jan 11 '18 at 10:58

5 Answers5

12

what fixed my problem was:

  • install scala plugin
  • restart
  • file -> close project
  • instead of open, click new project, select scala with sbt option, then next
  • select the same project as location.

hope it will save you time and energy

8

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

tekumara
  • 8,357
  • 10
  • 57
  • 69
4

In my case, scala plugin needed to be updated and accordingly this caused sbt to disappear from build tools.
Go to Settings --> Plugins --> Updates and make sure that scala plugin is updated. If it wasn't and you updated it, you should restart the IDE afterwards.
After that removing the .idea folder and reimporting the project was necessary for the project to build.

Hasnaa Ibraheem
  • 1,132
  • 1
  • 10
  • 18
3

You can select

Window → Restore Default layout

Or press Shift + F12

enter image description here

This will restore your default window layout and the tab will be visible again (You can check this works by hiding the sbt tab by right clicking and selecting 'Remove From Sidebar').

Some windows such as Maven or Ant need to be brought back by

View → ToolWindows → [Window Name]

enter image description here

Vojtech Ruzicka
  • 16,384
  • 15
  • 63
  • 66
  • Thanks @Vojtech, that worked. While the hidden sbt-shell reappeared, I had tried hiding the ant tab from sidebar (instead of sbt tab suggested by you) but that didn't come back. – y2k-shubham Jan 11 '18 at 09:03
  • Though I was able to get back the ant-build tab in sidebar from View > Tool Windows > Ant Build. Oddly enough, after restoring default layout, the SBT Shell option also appeared in this menu (which had gone missing before) – y2k-shubham Jan 11 '18 at 09:06
  • Updated my answer – Vojtech Ruzicka Jan 11 '18 at 09:07
3

In my case I enabled the sbt shell going to "File - Settings - Build, Execution, Deployment - Build Tools - sbt " and after enabling here, you need to restart your intellij and then you can find sbt-shell here "view- Tool window - sbt shell"

jhalak
  • 51
  • 2