@Override
  public void update(@NotNull AnActionEvent e) {
    boolean works = getFile(e) != null;
    e.getPresentation().setEnabledAndVisible(works);
    super.update(e);
  }
@Override
  public void update(@NotNull AnActionEvent e)