void (@NotNull final AnActionEvent e) { FileChooserDescriptor descriptor = new FileChooserDescriptor(true, false, true, false, true, true) { @Override public boolean isFileVisible(VirtualFile file, boolean showHiddenFiles) { return super.isFileVisible(file, showHiddenFiles) && (file.isDirectory() || "xml".equals(file.getExtension()) || FileTypeRegistry.getInstance().isFileOfType(file, ArchiveFileType.INSTANCE)); } @Override public boolean isFileSelectable(@Nullable VirtualFile file) { return file != null && FileTypeRegistry.getInstance().isFileOfType(file, StdFileTypes.XML); } }; descriptor.setDescription(JavaDebuggerBundle.message("please.select.a.file.to.import")); descriptor.setTitle(JavaDebuggerBundle.message("import.capture.points")); VirtualFile[] files = FileChooser.chooseFiles(descriptor, e.getProject(), null); if (ArrayUtil.isEmpty(files)) return; table.getSelectionModel().clearSelection(); for (VirtualFile file : files) { try { for (Element element : JDOMUtil.load(file.getInputStream()).getChildren()) { int idx = myTableModel.addIfNeeded(XmlSerializer.deserialize(element, CapturePoint.class)); table.getSelectionModel().addSelectionInterval(idx, idx); } } catch (Exception ex) { final String msg = ex.getLocalizedMessage(); Messages.showErrorDialog(e.getProject(), msg != null && !msg.isEmpty() ? msg : ex.toString(), JavaDebuggerBundle.message("export.failed")); } } }