Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 9480

Summary: JUnit Plugin: Color heirarchy tree
Product: [Eclipse Project] JDT Reporter: Channing Walton <channingwalton>
Component: UIAssignee: Erich Gamma <erich_gamma>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P2 Keywords: helpwanted
Version: 2.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
patch uses the OK/FAILURE/ERROR icons to indicate the test suite's status; if there's a test case with ERROR then the test suite will get the ERROR icon; if there's a FAILURE but no ERROR then the FAILURE icon is used; otherwise the OK icon is used none

Description Channing Walton CLA 2002-02-12 12:24:01 EST
Hi,
It would be nice to have the colors of each testsuite reflect the pass/fail 
status of its child suites/tests. Eg. green if all tests pass, red if there are 
any failures.
Comment 1 Erich Gamma CLA 2002-02-12 13:12:05 EST
yes! this would be consistent with the way we show error ticks, but not high 
priority.
Comment 2 Channing Walton CLA 2002-02-13 03:07:36 EST
Cool. 
Comment 3 Sebastian Davids CLA 2002-02-16 06:52:49 EST
From NG:

Randy Hudson - 2001-12-31 - Re: Color tree/table widget needed - bounty offered

You cannot "overpaint" on a native Tree.  Why?  There are times when the
Tree will paint and you will not get notification from the OS.  I was told
this by someone on the SWT team.  I believe one of the examples was
scrolling with a wheelmouse.

The heavyweight approach wouldn't look right with the smooth expand/collapse
on windows.

The "right" way (IMHO) to make coloring possible (and lots of other things
too) would be a JTree-like approach of painting the entire tree yourself.
Besides the visual flexibility, JTree's performance is much better at
handling large models.  The downside is you would have to implement keyboard
handling and other stuff.
Comment 4 Sebastian Davids CLA 2002-02-16 06:58:13 EST
Created attachment 377 [details]
patch uses the OK/FAILURE/ERROR icons to indicate the test suite's status; if there's a test case with ERROR then the test suite will get the ERROR icon; if there's a FAILURE but no ERROR then the FAILURE icon is used; otherwise the OK icon is used
Comment 5 Channing Walton CLA 2002-02-16 07:08:53 EST
Actually icons is what I really would like - just an indication of which suites 
have failures and /or errors (perhaps a special icon to indicate a suite that 
has both errors and failures?)

Channing
Comment 6 Sebastian Davids CLA 2002-02-16 08:15:38 EST
The patch uses the familiar icons from the test cases.

Only one Image can be associated to a TreeItem, i.e. in this context test 
suite.

That "special icon" would have to be created from scratch.

IMO it's OK for a test suite with ERRORs and FAILUREs to have only the ERROR 
icon.
Comment 7 Channing Walton CLA 2002-02-16 09:52:49 EST
Yes, the error icon should overide the failure one.

Thanks for this stuff :-)

Channing
Comment 8 Erich Gamma CLA 2002-03-30 08:16:43 EST
changed prio given that we got this as a patch (thanks!)
Comment 9 Erich Gamma CLA 2002-04-02 07:30:15 EST
From looking at the patch it looks like the error state is only propagated up 
one level to the parent but not to the root, e.g.

SuiteRoot
   SuiteParent
       ErrorTestCase

with the current code only SuiteParent gets the error icon. I think we sould be 
consistent with the error tick scheme used in JDT and propagate the error icon 
to the root.
Comment 10 Erich Gamma CLA 2002-05-19 19:52:51 EDT
now using the same "error tick" scheme as in the Java view.