private static @NotNull Language getLanguage(@NotNull PsiElement element) {
    return element instanceof ASTNode ? ((ASTNode)element).getElementType().getLanguage() : element.getLanguage();
  }
private static @NotNull Language getLanguage(@NotNull PsiElement element)