Actually, it might be better to use ``source.workspaceFile`` and, for getting the project, ``source.scalaProject.underlying``. Why? Because the methods you are using are provided by the JDT ``CompilationUnit`` class, while the ones I mentioned are defined in ``InteractiveCompilationUnit``. You know we plan to eventually get rid of the JDT editor, so it's wiser to depend on ``InteractiveCompilationUnit`` ;-)