@Override
  protected void update(@NotNull FileSystemTree fileChooser, @NotNull AnActionEvent e) {
    boolean visible = isEnabled(e);
    e.getPresentation().setVisible(visible);
    e.getPresentation().setEnabled(
      visible &&
      !(e.getInputEvent() instanceof KeyEvent && e.getData(PlatformCoreDataKeys.CONTEXT_COMPONENT) instanceof JTextField) &&  // do not override text deletion
      new VirtualFileDeleteProvider().canDeleteElement(e.getDataContext()));
  }
@Override
  protected void update(@NotNull FileSystemTree fileChooser, @NotNull AnActionEvent e)