This was taken from https://github.com/scala-ide/scala-worksheet/blob/master/org.scalaide.worksheet/src/org/scalaide/worksheet/editor/ScriptEditor.scala#L196

Do you have a suggestion for how to fix it?