void (@NotNull Project project, @NotNull ExporterToTextFile exporter) { final ExportDialogBase dlg = new ExportDialogBase(project, exporter); if (!dlg.showAndGet()) { return; } exportTextToFile(project, dlg.getFileName(), dlg.getText()); exporter.exportedTo(dlg.getFileName()); }