Open GlenKPeterson opened 11 years ago
Admittedly, the worksheet runtime goes nuts when naming a worksheet queries
. I actually didn't managed to exactly reproduce the issue as reported, but I did notice there was an entry in the Eclipse Error Log (so I've opened another ticket #109).
That said, I think what you are experiencing is more than just a crash in the runtime. If I have to guess, it looks like a race-condition between the editor and the evaluator. I'll have to investigate.
Thanks a ton for reporting this!
I've just experienced the same issue. I'm following the Coursera course on Functional Programming in Scala. In lecture 6, I created a worksheet called 'session' as per the lecture, and typed in most of the code for the examples in that lecture and on one of my saves all the code was deleted, and I was left with the boilerplate worksheet code as above:
object session {
println("Welcome to the Scala worksheet") //> Welcome to the Scala worksheet
}
Eclipse details Version: Indigo Service Release 2 Build id: 20120216-1857
Scala Plugin version: 3.0.0.v-2_10-2013
When I save the following worksheet (queries.sc):
it deletes my code and replaces it with:
This is particularly annoying when I have typed a half-page of code afterwards and it all disappears on save (Ctrl-S), often with no way to undo. Having the above case class statement at the top of the file like this seems to trigger it.
Eclipse 3.7.2, Scala IDE 2.1-M2-20121018-1623-Typesafe, on 64-bit Ubuntu Linux 12.04
UPDATE: The moral of this story may be not to name a worksheet "queries." I did the same thing in a worksheet with a different name and had no issue.