void (@NotNull PresentationData presentation, @NotNull SMTestProxy.SMRootTestProxy rootNode) { // Do not add any summary if test tree is not constructed. if (rootNode.isLeaf()) return; TestsUIUtil.TestResultPresentation testResultPresentation = new TestsUIUtil.TestResultPresentation(rootNode).getPresentation(); int failed = testResultPresentation.getFailedCount(); int ignored = testResultPresentation.getIgnoredCount(); int passed = testResultPresentation.getPassedCount(); int total = passed + failed + testResultPresentation.getNotStartedCount(); if (total == 0) return; presentation.addText(" [", SimpleTextAttributes.GRAY_ATTRIBUTES); boolean addSeparator = false; if (failed > 0) { presentation.addText(TestRunnerBundle.message("tests.result.failed.count", failed), ERROR_ATTRIBUTES); addSeparator = true; } if (passed > 0 || ignored + failed == 0) { if (addSeparator) { presentation.addText(", ", SimpleTextAttributes.GRAY_ATTRIBUTES); } presentation.addText(TestRunnerBundle.message("tests.result.passed.count", passed), SimpleTextAttributes.REGULAR_ATTRIBUTES); addSeparator = true; } if (ignored > 0) { if (addSeparator) { presentation.addText(", ", SimpleTextAttributes.GRAY_ATTRIBUTES); } presentation.addText(TestRunnerBundle.message("tests.result.ignored.count", ignored), IGNORE_ATTRIBUTES); } presentation.addText(TestRunnerBundle.message("tests.result.total.count", total) + "]", SimpleTextAttributes.GRAYED_ATTRIBUTES); }