diff options
Diffstat (limited to 'plugins/testng/src/com/theoryinpractice/testng/ui/ResultTreeRenderer.java')
-rw-r--r-- | plugins/testng/src/com/theoryinpractice/testng/ui/ResultTreeRenderer.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/plugins/testng/src/com/theoryinpractice/testng/ui/ResultTreeRenderer.java b/plugins/testng/src/com/theoryinpractice/testng/ui/ResultTreeRenderer.java index ba30f43b66f0..9ea4429447fe 100644 --- a/plugins/testng/src/com/theoryinpractice/testng/ui/ResultTreeRenderer.java +++ b/plugins/testng/src/com/theoryinpractice/testng/ui/ResultTreeRenderer.java @@ -16,6 +16,7 @@ package com.theoryinpractice.testng.ui; import com.intellij.execution.testframework.PoolOfTestIcons; +import com.intellij.execution.testframework.TestFrameworkRunningModel; import com.intellij.icons.AllIcons; import com.intellij.ui.ColoredTreeCellRenderer; import com.intellij.ui.SimpleTextAttributes; @@ -34,10 +35,11 @@ import javax.swing.tree.DefaultMutableTreeNode; */ public class ResultTreeRenderer extends ColoredTreeCellRenderer { - private final TestNGConsoleProperties consoleProperties; - public ResultTreeRenderer(TestNGConsoleProperties consoleProperties) { - this.consoleProperties = consoleProperties; + private TestFrameworkRunningModel model; + + public ResultTreeRenderer(TestFrameworkRunningModel model) { + this.model = model; } @Override @@ -47,7 +49,7 @@ public class ResultTreeRenderer extends ColoredTreeCellRenderer TestProxy proxy = ((TestNodeDescriptor) node.getUserObject()).getElement(); if (node == tree.getModel().getRoot()) { TreeRootNode root = (TreeRootNode) proxy; - if (node.getChildCount() == 0) { + if (node.getChildCount() == 0 && !((TestNGResults)model).hasFinishedTests()) { if ((root.isStarted() && root.isInProgress()) || (root.isInProgress() && !root.isStarted())) { setIcon(PoolOfTestIcons.NOT_RAN); append("Instantiating tests... ", SimpleTextAttributes.REGULAR_ATTRIBUTES); @@ -64,13 +66,13 @@ public class ResultTreeRenderer extends ColoredTreeCellRenderer append(root.isInProgress() ? "Running tests..." : "Test Results", SimpleTextAttributes.REGULAR_ATTRIBUTES); } - if (consoleProperties.isPaused()) { + if (model.getProperties().isPaused()) { setIcon(AllIcons.RunConfigurations.TestPaused); } } else { if (proxy.getResultMessage() != null) { final TestResultMessage result = proxy.getResultMessage(); - final String name = TestProxy.toDisplayText(result, consoleProperties.getProject()); + final String name = TestProxy.toDisplayText(result, model.getProperties().getProject()); append(name, SimpleTextAttributes.REGULAR_ATTRIBUTES); } else { append(proxy.getName(), SimpleTextAttributes.REGULAR_ATTRIBUTES); |