[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Traverse all TreeItems of a FilteredTree

Hi! I use a FilteredTree with checkboxes and want to use the "standard tree check box behaviour" as described in SWT Snippet247 (http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet274.java).

After implementing this, i noticed that with the FilteredTree a selection of a checkbox does not cause the checkboxes of the item's children be selected IF the item is not expanded AND was not expanded before. Only if the particular treeitem was expanded manually(!!) before, also the checkboxes of the item's children are selected.

I debugged through the code and found out that the getItems() method of the FilteredTree's Tree causes the problem. After starting the Application the getItem() method returns only items for items that are expanded originally. I also tried to expand and collapse all items before the application starts, but no success. After expanding and collapsing all items the traversal of the items worked fine, but after starting the application the traversal was only possible for expanded items.

So, is there a way to traverse all the TreeItems of a FilteredTree, no matter if the items are expanded/has been expanded before?

thx a lot.
Franz-Stefan Preiss