[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: Problem with TreeViewer

If a node has a changed it should call TreeViewer#update(element,null).

Tom

bbnjmn schrieb:
I have a similar problem.
Depending upon the state of the model, Some nodes have new/changed
label text. The text only displays -after- reopening the tree though. ie. the
tree's labels do not track the model state.
I've overridden getText(Object) in the item providers and tried calling TreeViewer#refresh(Object, true).
but the 'true' parameter is essentially a no-op further up the Viewer chain.


Any ideas ?

Thanks

Roy



"Tom Schindl" <tom.schindl@xxxxxxxxxxxxxxx> wrote in message news:f601ga$8r6$1@xxxxxxxxxxxxxxxxxxxx
Hi,

TreeViewer#add()
TreeViewer#insert()
TreeViewer#remove()

These method will only modify the UI it's your own task to sync the model! Another maybe an easier approach might be that if you add a model in a leave to only refresh the this part of the Tree using TreeViewer#refresh(Object).

Tom

Moutaz schrieb:
hii

i am using a jface TreeViewer from org.eclipse.jface.viewers.TreeViewer , during runtime when i add a new element in the my Tree, i say to the Viewer (viewer.setInput(root) , so it takes a root, so it redraw the Tree again , causes to refresh the Viewer by Flash (as removing all the tree and view it again) so if there is something that i can use, to add elements without this falsh

thanks in advance