Meet The New Scala Worksheets in IntelliJ IDEA
A few months ago we’ve significantly improved the Scala Worksheets performance. Today we made them even better, and by that we mean more user-friendly.
Now you can fold the output without affecting code on the left side, and expand only blocks output that match a specific statement:
Plus, you can improve evaluation performance by clearing the Make project option on the toolbar which disables automatic checking of project changes.
The new Scala Worksheets are available in the latest nightly build of the Scala plugin for IntelliJ IDEA 13.
Develop with Pleasure!
Comments below can no longer be edited.
Bill says:
May 23, 2014How do you open a new worksheet?
Suesse says:
May 23, 2014Working with Scala Worksheet
Andrey Cheptsov says:
May 23, 2014The same way you used to open old one . Just create a new worksheet or open an existing one. Make sure you use the latest nightly build.
Bill says:
May 23, 2014Thanks – I didn’t realize this was an already-existing feature.
Ross says:
May 23, 2014That’s awesome! Keep up the great work.
Eric P says:
May 23, 2014Looks great! Good job guys!
David Perez says:
May 26, 2014I also like this feature, more handy than the REPL. It’s useful.
Alex says:
May 26, 2014Please fix this
“object someobject {
val x = new SomeClass(…)
}
class SomeClass(…){…}
—-
The evaluation only print two lines of results: 1. defined module someobject; 2. defined class SomeClass. And whatever I write in object is not evaluated (at least no results).”
Alexander Podkhalyuzin says:
May 27, 2014We will fix for Eclipse compatibility reasons. However, as workaround just don’t wrap your expressions into object.
Best regards,
Alexander Podkhalyuzin.
Alex says:
May 27, 2014Thank you so much, many people will be grateful for that
Justinhj says:
June 1, 2014Does this work in the community edition?
Alexander Podkhalyuzin says:
June 8, 2014Yes, of course it will be available in community edition.
Daniel Zhang says:
June 18, 2014Thanks for the update. Is there a way to keep folded output open during successive runs of a Scala worksheet? Perhaps, there could be an option to automatically expand all folded output.
Guillaume says:
June 20, 2014We have an online version here: codebrew.io
Alex says:
June 24, 2014Worksheets stucks in 10-20 minutes. IDE just stops responding on keys. Mouse works, cut/paste too. Have to restart it too frequently.
Alex says:
June 24, 2014Also, i don’t like auto-restarts. There should be an option if i want to run the code, or it should play automatically. Auto starts are bad for long running code.
Alex says:
July 7, 2014You know what???
Worksheet gives java.lang.StackOverflowError where it should be fine!
def count(start: Int, stop: Int): Int =
if(start < stop) count(start + 1, stop)
else start
count(1, 400000)
jia says:
July 16, 2015Hi,
I am not able to see scala worksheet as an option when i try to create a new file in intelliJ. Although Scala is installed and scala file templates does exist.
What am i missing?
Manoj says:
July 22, 2016Hi,
Is there a way to debug your code when using the worksheet?
I would like to put a break point in my code and hit it when using the worksheet to help me debug. It might be that I am approaching it all wrong in which case I would like to know best practice.
Chris says:
September 5, 2016As with Jia, when i right click the “src” folder of my project folder, under New, there is no option to create a Scala file. The only options under the dropdown list are File, Directory, HTML file, XSLT Stylesheet.
How do I enable “Scala Worksheet” as an option under New?