This is an odd one, and I don't seem to find the right incantation. I'm putting the finishing touches on an automated Java -> Scala translator plugin. One action is to select a given Java file and translate it. This creates a new PsiFile using PsiFileFactory.createFileFromText followed by an appropriate directory.add(), and then .delete() the java PsiFile. So far so good. I would then like to automatically open up the resulting scala file. Unfortunately, no matter what I do I seem to get null on return from the scala psiFile.getVirtualFile() call. The docs seem to indicate that this is because the psiFile only exists in memory. How do I fault the file to disk, or alternately how do I open an non-faulted file in an editor?