void (@NotNull List<TraceElement> elements) { final int[] rows = elements.stream().map(myValue2Path::get).filter(Objects::nonNull).mapToInt(this::getRowForPath).sorted().toArray(); if (rows.length == 0) { return; } if (isShowing()) { final Rectangle bestVisibleArea = optimizeRowsCountInVisibleRect(rows); final Rectangle visibleRect = getVisibleRect(); final boolean notVisibleHighlightedRowExists = Arrays .stream(rows) .anyMatch(x -> !visibleRect.intersects(getRowBounds(x))); if (notVisibleHighlightedRowExists) { scrollRectToVisible(bestVisibleArea); } } else { // Use slow path if component hidden scrollPathToVisible(getPathForRow(rows[0])); } }