@Override
  public void update(@NotNull AnActionEvent e) {
    super.update(e);

    Presentation presentation = e.getPresentation();
    if (presentation.isEnabled()) {
      IdeaGateway gateway = getGateway();
      Collection<VirtualFile> files = getFiles(e);
      presentation.setEnabled(isActionEnabled(gateway, files));
    }
  }
@Override
  public void update(@NotNull AnActionEvent e)