Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » TreeViewer Adding items on expand Event
TreeViewer Adding items on expand Event [message #199815] Thu, 15 March 2007 23:08
Eclipse UserFriend
Originally posted by: alexyermolovich.gmail.com

Hello.
I am trying to add items to a tree when the branch is epxanded. I
implemented the ITreeViewerListener. Problem is when I add the object to
the node on which expansion happens and do refresh everything disapears.
When it expands it just shows empty branch. The new object is added to the
parent node, just UI never gets updated. When I add an object by firing a
button event in my view, new object is added and branch shows all the
objects including previously added ones. The code is exactly the same for
adding an object and refreshing a tree. Only difference on expand event I
get the parent object from:
TreeExpansionEvent event.
Object tempObj = event.getElement();

And when I when I click on a button I get parent object by going doing
this:
IStructuredSelection selection = (IStructuredSelection)
treeViewer.getSelection();
Model selectedDomainObject = (Model) selection.getFirstElement();

Is this a bug or am I missing something?
Previous Topic:Trying to use org.apache Packages
Next Topic:Run-time Eclipse Completely independent from work-bench eclipse
Goto Forum:
  


Current Time: Fri Apr 19 19:25:53 GMT 2024

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

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

Back to the top