@Override
  public @Nullable PsiElement findElementAt(int offset, @NotNull Class<? extends Language> lang) {
    PsiFile mainRoot = getPsi(getBaseLanguage());
    PsiElement ret = null;
    for (Language language : getLanguages()) {
      if (!ReflectionUtil.isAssignable(lang, language.getClass())) continue;
      if (lang.equals(Language.class) && !getLanguages().contains(language)) continue;

      PsiFile psiRoot = getPsi(language);
      PsiElement psiElement = findElementAt(psiRoot, offset);
      if (psiElement == null || psiElement instanceof OuterLanguageElement) continue;
      if (ret == null || psiRoot != mainRoot) {
        ret = psiElement;
      }
    }
    return ret;
  }
@Override
  public @Nullable PsiElement findElementAt(int offset, @NotNull Class<? extends Language> lang)