Updated based on rice's comments. I merged the root changes into TreeItem.
http://gwt-code-reviews.appspot.com/645802/diff/1/2 File user/src/com/google/gwt/user/client/ui/Tree.java (right): http://gwt-code-reviews.appspot.com/645802/diff/1/2#newcode1002 user/src/com/google/gwt/user/client/ui/Tree.java:1002: root = new TreeItem() { On 2010/06/30 18:56:03, Dan Rice wrote:
Is there a way to avoid duplicating so much code from
TreeItem.insertItem? Can
the superclass implementation take a flag to control whatever behavior
is
different here from the typical case?
Done. http://gwt-code-reviews.appspot.com/645802/diff/1/4 File user/test/com/google/gwt/user/client/ui/TreeItemTest.java (right): http://gwt-code-reviews.appspot.com/645802/diff/1/4#newcode32 user/test/com/google/gwt/user/client/ui/TreeItemTest.java:32: In this case, I mean to "re-add" the same item. I reworded it so it would make more sense... in english. http://gwt-code-reviews.appspot.com/645802/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
