In the Scala IDE we have a more general method that you can use for this (and I believe you already use it somewhere) You could use the ``asInstanceOfOpt``method in ``scala.tools.eclipse.util.Utils``.

Basically, you need to import the implicit conversion ``Utils.any2optionable`` and then you can just call ``instance.asInstanceOfOpt[ScalaSourceFileEditor]``.