protected static @Nullable PsiElement getElement(@NotNull Editor editor, @NotNull PsiFile file) {
    CaretModel caretModel = editor.getCaretModel();
    int position = caretModel.getOffset();
    return file.findElementAt(position);
  }
protected static @Nullable PsiElement getElement(@NotNull Editor editor, @NotNull PsiFile file)