void (@NotNull final AnActionEvent e) { List<BaseInjection> injections = getInjectionList(getSelectedInjections()); VirtualFileWrapper wrapper = FileChooserFactory.getInstance() .createSaveFileDialog(new FileSaverDescriptor(IntelliLangBundle.message("dialog.title.export.selected.injections.to.file"), "", "xml"), myProject) .save((Path)null, null); if (wrapper == null) { return; } Configuration configuration = new Configuration(); configuration.setInjections(injections); try { JDOMUtil.write(configuration.getState(), wrapper.getFile().toPath()); } catch (IOException ex) { final String msg = ex.getLocalizedMessage(); Messages.showErrorDialog(myProject, msg != null && msg.length() > 0 ? msg : ex.toString(), IntelliLangBundle.message("dialog.title.export.failed")); } }