private Language getLanguageByOffset(int offset) {
    if (offset < myFile.getTextLength()) {
      PsiElement element = myFile.findElementAt(offset);
      if (element != null) {
        return element.getLanguage();
      }
    }
    return null;
  }
private Language getLanguageByOffset(int offset)