Calls to TreeViewer refresh only work the first time
Calls to TreeViewer refresh only work the first time
I have an asynch Tree using TreeViewer and TreeContentProvider. I load the tree from the database and then add items via a form. When the call returns from the add item, I call
viewer.refresh(tree.getSelectionModel());
viewer.update(tree.getSelectionModel());
if (!tree.getSelectedItem().isExpanded()){
tree.getSelectedItem().setExpanded(true);
}
The FIRST time the new item is added to the tree and the parent is expanded works great. Subsequent calls and the tree never updates.