@Internal
  public static @Nullable PsiElement getContextElement(Editor editor, PsiFile file) {
    return getContextElement(file, editor.getCaretModel().getOffset());
  }
@Internal
  public static @Nullable PsiElement getContextElement(Editor editor, PsiFile file)