protected @Nullable PsiElement getElement(@NotNull Editor editor, @NotNull PsiFile file) {
    int position = editor.getCaretModel().getOffset();
    return file.findElementAt(useElementToTheLeft ? position - 1 : position);
  }
protected @Nullable PsiElement getElement(@NotNull Editor editor, @NotNull PsiFile file)