PDA

View Full Version : [CLOSED] TreeContentProvider void getChildren (typo ?)



zaccret
6 May 2008, 6:40 AM
In the TreeContentProvider interface we have a void getChildren method. The javadoc says it returns the child elements but it is a void method.


/**
* Returns the child elements of the given parent.
*
* @param parent the parent element
* @param callback the content callback
*/
public void getChildren(Object parent, AsyncContentCallback<Object> callback);
When I look at the only implementation (ModelTreeContentProvider), what it does is setting elements. Therefore I suppose the method name should be setChildren (otherwise it is a bit confusing) and the javadoc should be modified.

Thanks.

darrellmeyer
12 May 2008, 12:38 PM
The viewer code has been removed from the library. The new mechanism for getting a parent's children is via a TreeLoader:


/**
* Initiates a load request for the parent's children.
*
* @param parent the parent
* @return true if the load was requested
*/
public boolean loadChildren(ModelData parent);