private void fillConflictsPanel(@NotNull Keymap keymap) {
    mySystemShortcutConflictsPanel.removeAll();
    SystemShortcuts systemShortcuts = SystemShortcuts.getInstance();
    final @NotNull Collection<SystemShortcuts.ConflictItem> allConflicts = systemShortcuts.getUnmutedKeymapConflicts();
    if (allConflicts.isEmpty())
      return;

    HtmlBuilder links = new HtmlBuilder();
    final Map<String, Runnable> href2linkAction = new HashMap<>();
    int count = 0;
    boolean empty = true;
    for (SystemShortcuts.ConflictItem conf: allConflicts) {
      final @NotNull String actId = conf.getActionIds()[0];
      href2linkAction.put(actId, ()->{
        final KeyboardShortcut confShortcut = findKeyboardShortcut(keymap, conf.getSysKeyStroke(), actId);
        addKeyboardShortcut(actId, ActionShortcutRestrictions.getInstance().getForActionId(actId), keymap, this, confShortcut,
                            systemShortcuts, myQuickLists);
      });
      AnAction action = ActionManager.getInstance().getAction(actId);
      String actionText = action == null ? actId : action.getTemplatePresentation().getText();
      if (!empty) links.append(", ");
      links.appendLink(actId, actionText);

      empty = false;
      ++count;
      if (count > 2)
        break;
    }

    String shortcutsMessage;
    if (count > 2 && allConflicts.size() > count) {
      String actionId = "show.more";
      HtmlChunk.Element moreLink = HtmlChunk.link(actionId, IdeBundle.message("more.shortcuts.link.text.with.count", allConflicts.size() - count));

      href2linkAction.put(actionId, ()->{
        myShowOnlyConflicts = true;
        myActionsTree.setBaseFilter(systemShortcuts.createKeymapConflictsActionFilter());
        myActionsTree.filter(null, myQuickLists);
        TreeUtil.expandAll(myActionsTree.getTree());
      });
      shortcutsMessage = IdeBundle.message("macos.shortcut.conflict.many", links, moreLink);
    } else {
      shortcutsMessage = IdeBundle.message("macos.shortcut.conflict.few", links);
    }

    HtmlBuilder builder = new HtmlBuilder();
    builder.appendRaw(shortcutsMessage)
      .br().append(IdeBundle.message("assign.custom.shortcuts.or.change.the.macos.system.settings"));

    JBLabel jbLabel = new JBLabel(createWarningHtmlText(builder.toString())) {
      @Override
      protected @NotNull HyperlinkListener createHyperlinkListener() {
        return new HyperlinkListener() {
          @Override
          public void hyperlinkUpdate(HyperlinkEvent e) {
            if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
              final String href = e.getDescription();
              final Runnable act = href2linkAction.get(href);
              if (act != null)
                act.run();
            }
          }
        };
      }
    };
    jbLabel.setCopyable(true);
    jbLabel.setAllowAutoWrapping(true);
    jbLabel.setIconWithAlignment(AllIcons.General.Warning, SwingConstants.LEFT, SwingConstants.TOP);
    mySystemShortcutConflictsPanel.add(jbLabel);

    validate();
    repaint();
  }
private void fillConflictsPanel(@NotNull Keymap keymap)