PsiFile (@NotNull CharSequence text) { Project project = getProject(); FileType fileType = getFileTypeWithoutSubstitution(this); if (!(fileType instanceof LanguageFileType)) { throw new AssertionError("PSI can be created only for a file with LanguageFileType but actual is " + fileType.getClass() + "." + "\nPlease use a proper FileBasedIndexExtension#getInputFilter() implementation for the caller index"); } return createFileFromText(project, text, (LanguageFileType)fileType, myFile, getFileName()); }