do not add "Runner" to the categories
diff --git a/core/plugins/org.eclipse.dltk.testing/src/org/eclipse/dltk/internal/testing/ui/TestSessionLabelProvider.java b/core/plugins/org.eclipse.dltk.testing/src/org/eclipse/dltk/internal/testing/ui/TestSessionLabelProvider.java
index d097181..fa014c5 100755
--- a/core/plugins/org.eclipse.dltk.testing/src/org/eclipse/dltk/internal/testing/ui/TestSessionLabelProvider.java
+++ b/core/plugins/org.eclipse.dltk.testing/src/org/eclipse/dltk/internal/testing/ui/TestSessionLabelProvider.java
@@ -44,8 +44,7 @@
return getTestRunnerUI().getTestCaseLabel(caseElement, false);
} else if (element instanceof ITestSuiteElement) {
return ((ITestSuiteElement) element).getSuiteTypeName();
- }
- else if (element instanceof ITestCategoryElement) {
+ } else if (element instanceof ITestCategoryElement) {
return ((ITestCategoryElement) element).getCategoryName();
}
return element.toString();
@@ -60,13 +59,19 @@
final String label = getSimpleLabel(element);
if (fLayoutMode == TestRunnerViewPart.LAYOUT_HIERARCHICAL
&& element instanceof ITestElement
- && ((ITestElement) element).getParentContainer() instanceof ITestRunSession) {
- final String runnerDisplayName = getTestRunnerUI().getDisplayName();
- if (runnerDisplayName != null) {
- return Messages
- .format(
- DLTKTestingMessages.TestSessionLabelProvider_testName_JUnitVersion,
- new Object[] { label, runnerDisplayName });
+ && !(element instanceof ITestCategoryElement)) {
+ final ITestElement parent = ((ITestElement) element)
+ .getParentContainer();
+ if (parent instanceof ITestRunSession
+ || parent instanceof ITestCategoryElement) {
+ final String runnerDisplayName = getTestRunnerUI()
+ .getDisplayName();
+ if (runnerDisplayName != null) {
+ return Messages
+ .format(
+ DLTKTestingMessages.TestSessionLabelProvider_testName_JUnitVersion,
+ new Object[] { label, runnerDisplayName });
+ }
}
}
return label;