void (@NotNull final JTree tree, final Object value, final boolean selected, final boolean expanded, final boolean leaf, final int row, final boolean hasFocus) { myDurationText = null; myDurationColor = null; myDurationWidth = 0; myDurationLeftInset = 0; myDurationRightInset = 0; final DefaultMutableTreeNode node = (DefaultMutableTreeNode) value; final Object userObj = node.getUserObject(); if (userObj instanceof SMTRunnerNodeDescriptor desc) { final SMTestProxy testProxy = desc.getElement(); if (testProxy instanceof SMTestProxy.SMRootTestProxy rootTestProxy) { if (rootTestProxy.isLeaf()) { TestsPresentationUtil.formatRootNodeWithoutChildren(rootTestProxy, this); } else { TestsPresentationUtil.formatRootNodeWithChildren(rootTestProxy, this); } if (myAdditionalRootFormatter != null) { myAdditionalRootFormatter.format(rootTestProxy, this); } } else { TestsPresentationUtil.formatTestProxy(testProxy, this); } if (TestConsoleProperties.SHOW_INLINE_STATISTICS.value(myConsoleProperties)) { myDurationText = testProxy.getDurationString(myConsoleProperties); if (myDurationText != null) { FontMetrics metrics = getFontMetrics(RelativeFont.SMALL.derive(getFont())); myDurationWidth = metrics.stringWidth(myDurationText); myDurationLeftInset = metrics.getHeight() / 4; myDurationRightInset = ExperimentalUI.isNewUI() ? tree.getInsets().right + JBUI.scale(4) : myDurationLeftInset; myDurationColor = selected ? UIUtil.getTreeSelectionForeground(hasFocus) : SimpleTextAttributes.GRAYED_ATTRIBUTES.getFgColor(); } } return; } //strange node final @NlsSafe String text = node.toString(); //no icon append(text != null ? text : SPACE_STRING, SimpleTextAttributes.GRAYED_ATTRIBUTES); }