@Nullable
protected PsiFile createFile(@NotNull final Language lang) {
if (lang == getTemplateDataLanguage()) {
// final PsiFileImpl file = (PsiFileImpl)LanguageParserDefinitions.INSTANCE.forLanguage(lang).createFile(this);
final PsiFileImpl file = (PsiFileImpl)LanguageParserDefinitions.INSTANCE.forLanguage(StdLanguages.HTML).createFile(this);
file.setContentElementType(CfmlElementTypes.TEMPLATE_DATA);
return file;
}
if (lang == SqlLanguage.INSTANCE) {
final PsiFileImpl file = (PsiFileImpl)LanguageParserDefinitions.INSTANCE.forLanguage(SqlLanguage.INSTANCE).createFile(this);
file.setContentElementType(CfmlElementTypes.SQL_DATA);
return file;
}
if (lang == getBaseLanguage()) {
return LanguageParserDefinitions.INSTANCE.forLanguage(lang).createFile(this);