@Override
    public void actionPerformed(ActionEvent e) {
      Object[] options = {"Export", "Cancel"};
      final String[] EXPORT_OPTIONS = {"CSV", "JSON"};
      final String[] EXPORT_WHICH_OPTIONS = {"All Tab Logs", "Selected Tab Logs"};
      final String[] EXPORT_VALUE_OPTIONS = {"Log Entry", "Log Entry + Full HTTP Request"};

      final JComboBox<String> exportTypeComboBox = new JComboBox<>(EXPORT_OPTIONS);
      final JComboBox<String> exportWhichComboBox = new JComboBox<>(EXPORT_WHICH_OPTIONS);
      final JComboBox<String> exportValueComboBox = new JComboBox<>(EXPORT_VALUE_OPTIONS);

      final JFileChooser exportLogsPathChooser = new JFileChooser();

      JPanel exportLogsPanel = new JPanel();
      exportLogsPanel.setLayout(new BoxLayout(exportLogsPanel, BoxLayout.PAGE_AXIS));
      exportLogsPanel.add(exportWhichComboBox);
      exportLogsPanel.add(exportValueComboBox);
      exportLogsPanel.add(exportTypeComboBox);
      JPanel buttonPanel = new JPanel();
      exportLogsPanel.add(buttonPanel);

      int option = JOptionPane.showOptionDialog(rootPane, exportLogsPanel,
          "Export Logs", JOptionPane.DEFAULT_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[0]);
      if (option == 1) {
        return;
      }
      int returnVal = exportLogsPathChooser.showSaveDialog(rootPane);
      if (returnVal != JFileChooser.APPROVE_OPTION) {
        BurpExtender.getCallbacks().printOutput("Cannot open a file dialog for exporting logs.");
        return;
      }
      AutoRepeater autoRepeater = BurpExtender.getSelectedAutoRepeater();
      LogManager logManager = autoRepeater.getLogManager();
      File file = exportLogsPathChooser.getSelectedFile();
      ArrayList<LogEntry> logEntries = new ArrayList<>();
      // collect relevant entries
      if ((exportWhichComboBox.getSelectedItem()).equals("All Tab Logs")) {
        logEntries = autoRepeater.getLogTableModel().getLog();
      } else if ((exportWhichComboBox.getSelectedItem()).equals("Selected Tab Logs")) {
        int[] selectedRows = autoRepeater.getLogTable().getSelectedRows();
        for (int row : selectedRows) {
          logEntries.add(logManager.getLogEntry(autoRepeater.getLogTable().convertRowIndexToModel(row)));
        }
      }
      // determine if whole request should be exported or just the log contents
      boolean exportFullHttp = !((exportValueComboBox.getSelectedItem()).equals("Log Entry"));

      try (PrintWriter out = new PrintWriter(file.getAbsolutePath())) {
        if ((exportTypeComboBox.getSelectedItem()).equals("CSV")) {
          out.println(Utils.exportLogEntriesToCsv(logEntries, exportFullHttp));
        } else if ((exportTypeComboBox.getSelectedItem()).equals("JSON")) {
          out.println(Utils.exportLogEntriesToJson(logEntries, exportFullHttp));
        }
      } catch (FileNotFoundException error) {
        error.printStackTrace();
      }
    }
Action listener for export logs menu.
src/burp/Utils/AutoRepeaterMenu.java