@Override
    public void actionPerformed(ActionEvent e) {
      Object[] options = {"Current Tab", "Every Tab", "Cancel"};
      int option = JOptionPane.showOptionDialog(rootPane, "Which tab would you like to export?", "Export Tabs",
          JOptionPane.DEFAULT_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[0]);
      if (option == 2) { return; }
      final JFileChooser exportPathChooser = new JFileChooser();
      int returnVal = exportPathChooser.showSaveDialog(rootPane);
      if (returnVal != JFileChooser.APPROVE_OPTION) {
        BurpExtender.getCallbacks().printOutput("Cannot open a file dialog for exporting settings.");
        return;
      }
      File file = exportPathChooser.getSelectedFile();
      try (PrintWriter out = new PrintWriter(file.getAbsolutePath())) {
        if (option == 0) {
          // export current tab
          out.println(BurpExtender.exportSave(BurpExtender.getSelectedAutoRepeater()));
        } else if (option == 1) {
          // export every tab
          out.println(BurpExtender.exportSave());
        }
      } catch (FileNotFoundException error) {
        error.printStackTrace();
      }
    }
Action listener for export settings menu.
src/burp/Utils/AutoRepeaterMenu.java