public static @Nullable PsiElement findElementAt(@Nullable PsiElement psiFile, int offset) {
    ASTNode node = psiFile == null ? null : psiFile.getNode();
    return node == null ? null : SourceTreeToPsiMap.treeElementToPsi(node.findLeafElementAt(offset));
  }
public static @Nullable PsiElement findElementAt(@Nullable PsiElement psiFile, int offset)