Document () { Project project = getProjectIfValid(); final PsiFileFactory factory = PsiFileFactory.getInstance(project); final long stamp = LocalTimeCounter.currentTime(); final PsiFile psiFile = factory.createFileFromText("Dummy." + myFileType.getDefaultExtension(), myFileType, "", stamp, true, false); return PsiDocumentManager.getInstance(project).getDocument(psiFile); }