boolean (@NotNull final PsiFile file, @NotNull final PsiElement elementAt) { final Language elementLanguage = elementAt.getLanguage(); if (file.getLanguage() instanceof CompositeLanguage compositeLanguage) { final Language[] extensions = compositeLanguage.getLanguageExtensionsForFile(file); return ArrayUtil.contains(elementLanguage, extensions); } return false; }