@Override
  @SuppressWarnings({"SSBasedInspection", "RedundantSuppression"})
  public Map<String, ValidationResult.Option> askUser(List<ValidationResult> validationResults) throws OperationCancelledException {
    boolean canProceed = validationResults.stream().noneMatch(r -> r.options.contains(ValidationResult.Option.NONE));
    Map<String, ValidationResult.Option> result = new HashMap<>();

    invokeAndWait(() -> {
      if (myCancelled) return;

      JDialog dialog = new JDialog(myFrame, UpdaterUI.message("main.title"), true);
      dialog.setLayout(new BorderLayout());
      dialog.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);

      JPanel buttonsPanel = new JPanel();
      buttonsPanel.setBorder(BUTTONS_BORDER);
      buttonsPanel.setLayout(new BoxLayout(buttonsPanel, BoxLayout.X_AXIS));
      buttonsPanel.add(Box.createHorizontalGlue());

      JButton cancelButton = new JButton(UpdaterUI.message("button.cancel"));
      cancelButton.addActionListener(e -> {
        myCancelled = true;
        myCancelButton.setEnabled(false);
        dialog.setVisible(false);
      });
      buttonsPanel.add(cancelButton);

      if (canProceed) {
        JButton proceedButton = new JButton(UpdaterUI.message("button.proceed"));
        proceedButton.addActionListener(e -> dialog.setVisible(false));
        buttonsPanel.add(proceedButton);
        dialog.getRootPane().setDefaultButton(proceedButton);
      }
      else {
        dialog.getRootPane().setDefaultButton(cancelButton);
      }

      JTable table = new JTable();
      table.setCellSelectionEnabled(true);
      table.setDefaultEditor(ValidationResult.Option.class, new MyCellEditor());
      table.setDefaultRenderer(Object.class, new MyTableCellRenderer());

      MyTableModel model = new MyTableModel(validationResults);
      table.setModel(model);
      table.setRowHeight(new JLabel("|").getPreferredSize().height);

      TableColumnModel columnModel = table.getColumnModel();
      for (int i = 0; i < columnModel.getColumnCount(); i++) {
        columnModel.getColumn(i).setPreferredWidth(MyTableModel.getColumnWidth(i, 1000));
      }

      var msgPanel = new JPanel();
      msgPanel.setLayout(new BoxLayout(msgPanel, BoxLayout.Y_AXIS));
      msgPanel.setBorder(LABEL_BORDER);
      var header = new JLabel(UpdaterUI.message("conflicts.header"));
      header.setBorder(LABEL_BORDER);
      msgPanel.add(header);
      var message = canProceed ? UpdaterUI.message("conflicts.text.1") : UpdaterUI.message("conflicts.text.2");
      msgPanel.add(new JLabel(convertToHtml(message)));

      dialog.add(msgPanel, BorderLayout.NORTH);
      dialog.add(new JScrollPane(table), BorderLayout.CENTER);
      dialog.add(buttonsPanel, BorderLayout.SOUTH);
      dialog.getRootPane().setBorder(FRAME_BORDER);
      dialog.setPreferredSize(new Dimension(1000, 500));
      dialog.pack();
      dialog.setLocationRelativeTo(null);
      dialog.setVisible(true);

      model.collectOptions(result);
    });

    checkCancelled();
    return result;
  }
@Override
  @SuppressWarnings({"SSBasedInspection", "RedundantSuppression"})
  public Map<String, ValidationResult.Option> askUser(List<ValidationResult> validationResults)