Always use `askOption` instead of `ask`, to account for failures. The editor should be robust against a non-functional compiler (for instance, if the Scala library isn't on the classpath, the compiler will crash on every call, which can be several times per second, leading to lots of error messages, or worse, dialog boxes).

I am not sure the new calls to `ask` are needed here. Did you notice any assertion failures originating here? I wouldn't add them everywhere, as they are expensive calls (the PC thread is a limited and precious resource).