@Override
  public void update(@NotNull AnActionEvent event) {
    Presentation presentation = event.getPresentation();
    DataContext dataContext = event.getDataContext();
    ExporterToTextFile exporterToTextFile = getExporter(dataContext);
    presentation.setEnabledAndVisible(event.getProject() != null &&
                                      exporterToTextFile != null && exporterToTextFile.canExport());
  }
@Override
  public void update(@NotNull AnActionEvent event)