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

Bug 371543

Summary: treetable - clean up handling of expand and collapse images
Product: [ECD] Orion Reporter: Susan McCourt <susan>
Component: ClientAssignee: Susan McCourt <susan>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: grant_gayed
Version: 0.4   
Target Milestone: 0.5 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Susan McCourt CLA 2012-02-14 16:55:09 EST
treetable.js currently has several ways of dealing with expand collapse images.

- the toggle API supplies the expand and collapse image classes.  This is a bit of a leak of renderer implementation into the tabletree and wasn't a very good idea to begin with.
- various refresh API added the ability to pass in expand and collapse image classes while refreshing the tree.  Even a worse idea, extending the leak into more methods.
- in fixing bug 367363 I realize that the previous 2 ideas were wrong.  The renderer should just be informed when the expand or collapse state of a row changes, and it should update the visual as needed.

For bug 367363 I did the minimal fix needed.
We should clean this up for real after 0.4.
What should be done:

- get rid of image class parameters in treetable 
toggle
refresh
refreshAndExpand
- fix all callers (check all explorer extensions)
Comment 1 Susan McCourt CLA 2012-02-14 16:56:19 EST
Gut check the refresh/refreshAndExpand API while we're at it.
Comment 2 Susan McCourt CLA 2012-04-23 13:22:34 EDT
- Removed all the image id, expand, and collapse image parameters from the toggle and refresh methods
- Got rid of refreshAndExpand(parent, children) since callers can use refresh(parent, children, true)
- checked for all clients of these three methods

The only thing I wasn't sure about was how to test the debug "connections" page which uses tabletree.  It doesn't seem to appear in a self hosted site setup and I've actually never seen it before....cc'ing Grant as a heads up that I made a mechanical change to this page.