void (final @NotNull PsiErrorElement errorElement, final @NotNull HighlightInfo.Builder highlightInfo) { final PsiFile psiFile = errorElement.getContainingFile(); final FileViewProvider provider = psiFile.getViewProvider(); if (!(provider instanceof TemplateLanguageFileViewProvider)) return; if (psiFile.getLanguage() != ((TemplateLanguageFileViewProvider)provider).getTemplateDataLanguage()) return; IntentionAction action = createChangeTemplateDataLanguageFix(errorElement); highlightInfo.registerFix(action, null, null, null, null); }