PsiFile (@NotNull Project project, @NotNull LanguageFileType fileType, Language dialect, @NotNull String text) { final String name = "__dummy." + fileType.getDefaultExtension(); final PsiFileFactory factory = PsiFileFactory.getInstance(project); return dialect == null ? factory.createFileFromText(name, fileType, text, LocalTimeCounter.currentTime(), true, true) : factory.createFileFromText(name, dialect, text, true, true); }