Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » TreeItem.getItems inaccurate
TreeItem.getItems inaccurate [message #502867] Thu, 10 December 2009 00:33 Go to next message
Eclipse UserFriend
We need to programmatically expand a node and then get a list of its
children.

In our implementation, we are using a DeferredContentManager to provide
the children. We called expandToLevel and then treeItem.getChildren and
this intermittently returns an incomplete list of children.

We also tried setExpandedState and setExpandedTreePath and even attaching
an ITreeViewerListener (which never got notified of the expansion).

So what is the correct way to programmatically expand a node and then get
a complete list of its children?

Craig
Re: TreeItem.getItems inaccurate [message #503759 is a reply to message #502867] Tue, 15 December 2009 06:08 Go to previous messageGo to next message
Eclipse UserFriend
Anyone?
Re: TreeItem.getItems inaccurate [message #503947 is a reply to message #503759] Wed, 16 December 2009 10:12 Go to previous message
Eclipse UserFriend
You may get more response if you ask this on the eclipse.platform newsgroup,
since that is where DeferredContentManager comes from.

Presumably it's a timing issue where your items haven't been added to the
Tree yet, but since I'm not familiar with DeferredContentManager I don't
know why it would work inconsistenly. A hack you can try is to do your
getChildren() call in a Display.asyncExec() runnable, to give the new items
an extra cycle to be added to the Tree. I would not suggest this as a final
solution though, just as a way of confirming whether it is related to
timing.

Grant


"Craig Foote" <CraigFoote@gmail.com> wrote in message
news:hg8ca9$fjf$1@build.eclipse.org...
> Anyone?
Previous Topic:FC12 / can't click wizard buttons
Next Topic:How to add a action to a Text popupmenu?
Goto Forum:
  


Current Time: Sun Jul 06 13:46:58 EDT 2025

Powered by FUDForum. Page generated in 0.03515 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top