From c0d122a980fd2a28dc916d3458dc20954c5edd2e Mon Sep 17 00:00:00 2001 From: Anna Kozlova Date: Mon, 4 May 2015 19:06:08 +0200 Subject: [PATCH] junit/testng sm runner: hide top level tree node - everything it provides, is written in the tab title anyway --- .../JavaAwareTestConsoleProperties.java | 5 +++++ .../sm/runner/ui/SMTestRunnerResultsForm.java | 12 +++++++++++- .../testframework/TestConsoleProperties.java | 4 ++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/java/execution/impl/src/com/intellij/execution/testframework/JavaAwareTestConsoleProperties.java b/java/execution/impl/src/com/intellij/execution/testframework/JavaAwareTestConsoleProperties.java index d49624954ff0..7337bb0fde95 100644 --- a/java/execution/impl/src/com/intellij/execution/testframework/JavaAwareTestConsoleProperties.java +++ b/java/execution/impl/src/com/intellij/execution/testframework/JavaAwareTestConsoleProperties.java @@ -64,6 +64,11 @@ public abstract class JavaAwareTestConsoleProperties 0 && + myProperties.hideTreeRootIfNotEmpty()) { + myTreeView.setRootVisible(false); + } + return children; + } + }; myTreeBuilder = new SMTRunnerTreeBuilder(myTreeView, structure); myTreeBuilder.setTestsComparator(TestConsoleProperties.SORT_ALPHABETICALLY.value(myProperties)); Disposer.register(this, myTreeBuilder); diff --git a/platform/testRunner/src/com/intellij/execution/testframework/TestConsoleProperties.java b/platform/testRunner/src/com/intellij/execution/testframework/TestConsoleProperties.java index b0661e1670cb..6716492fdeb3 100644 --- a/platform/testRunner/src/com/intellij/execution/testframework/TestConsoleProperties.java +++ b/platform/testRunner/src/com/intellij/execution/testframework/TestConsoleProperties.java @@ -204,4 +204,8 @@ public abstract class TestConsoleProperties extends StoringPropertyContainer imp protected int getSelectionMode() { return TreeSelectionModel.SINGLE_TREE_SELECTION; } + + public boolean hideTreeRootIfNotEmpty() { + return false; + } }