void (@NotNull final AnActionEvent e) { VirtualFileWrapper wrapper = FileChooserFactory.getInstance() .createSaveFileDialog(new FileSaverDescriptor(JavaDebuggerBundle.message("export.selected.capture.points.to.file"), "", "xml"), e.getProject()) .save((Path)null, null); if (wrapper == null) return; Element rootElement = new Element("capture-points"); selectedCapturePoints(table).forEach(c -> { try { CapturePoint clone = c.clone(); clone.myEnabled = false; rootElement.addContent(XmlSerializer.serialize(clone)); } catch (CloneNotSupportedException ex) { LOG.error(ex); } }); try { JDOMUtil.write(rootElement, wrapper.getFile().toPath()); } catch (Exception ex) { final String msg = ex.getLocalizedMessage(); Messages.showErrorDialog(e.getProject(), msg != null && !msg.isEmpty() ? msg : ex.toString(), JavaDebuggerBundle.message("export.failed")); } }