void (@NotNull Map<TypeInfo, Long> class2Count) { releaseMouseListener(); getEmptyText().setText(StatusText.getDefaultEmptyText()); final TypeInfo selectedClass = myModel.getSelectedClassBeforeHide(); int newSelectedIndex = -1; final boolean isInitialized = !myItems.isEmpty(); myItems = List.copyOf(class2Count.keySet()); int i = 0; for (final TypeInfo ref : class2Count.keySet()) { if (ref.equals(selectedClass)) { newSelectedIndex = i; } final DiffValue oldValue = isInitialized && !myCounts.containsKey(ref) ? new DiffValue(0, 0) : myCounts.getOrDefault(ref, UNKNOWN_VALUE); myCounts.put(ref, oldValue.update(class2Count.get(ref))); i++; } showContent(); if (newSelectedIndex != -1 && !myModel.isHidden()) { final int ix = convertRowIndexToView(newSelectedIndex); changeSelection(ix, DiffViewTableModel.CLASSNAME_COLUMN_INDEX, false, false); } fireTableDataChanged(); }