private static @NotNull Language getLanguage(@NotNull PsiSnippetDocTagImpl snippet) {
    PsiSnippetDocTagValue valueElement = snippet.getValueElement();
    if (valueElement == null) return JShellLanguage.INSTANCE;
    final PsiSnippetAttributeList attributeList = valueElement.getAttributeList();

    PsiSnippetAttribute attribute = attributeList.getAttribute(PsiSnippetAttribute.LANG_ATTRIBUTE);
    if (attribute == null) {
      return JShellLanguage.INSTANCE;
    }
    final PsiSnippetAttributeValue langValue = attribute.getValue();

    if (langValue != null) {
      String langValueText = langValue.getValue();
      if ("java".equalsIgnoreCase(langValueText)) {
        return JShellLanguage.INSTANCE;
      }

      final Language language = LanguageUtil.findRegisteredLanguage(langValueText);
      if (language != null) {
        return language;
      }
    }
    return PlainTextLanguage.INSTANCE;
  }
private static @NotNull Language getLanguage(@NotNull PsiSnippetDocTagImpl snippet)