void (@NotNull AnActionEvent e) { DataContext dataContext = e.getDataContext(); Project project = e.getProject(); ExporterToTextFile exporterToTextFile = getExporter(dataContext); if (project == null || exporterToTextFile == null) return; if (!exporterToTextFile.canExport()) return; ExportToFileUtil.chooseFileAndExport(project, exporterToTextFile); }