Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » updating a viewer of a view from another view
updating a viewer of a view from another view [message #467331] Thu, 03 May 2007 08:59 Go to next message
eric is currently offline ericFriend
Messages: 8
Registered: July 2009
Junior Member
Hi to all,

I created a plugin with three views. Each of these views are connected to a level of a repository-tree. i.e.

1. ParentView: list everything on the repository tree.
2. ChildrenView: When I click on an item, I have all its children listed on the children view
3. GrandChildrenView: list the items from the children when clicked.

Now when I delete an item from each of these views, the corresponding view is refreshed, but when I delete an item from, let's say ParentView, neither the Children nor the GrandChildren-View is refreshed. All these items are listed in a tableViewer.

Thanks in advance.
Enrique
Re: updating a viewer of a view from another view [message #467392 is a reply to message #467331] Thu, 03 May 2007 13:08 Go to previous messageGo to next message
jmi is currently offline jmiFriend
Messages: 84
Registered: July 2009
Member
Perhaps try using the Selection Service:

http://www.eclipse.org/articles/Article-WorkbenchSelections/ article.html
Re: updating a viewer of a view from another view [message #467413 is a reply to message #467392] Thu, 03 May 2007 15:20 Go to previous messageGo to next message
eric is currently offline ericFriend
Messages: 8
Registered: July 2009
Junior Member
I looked at the link, but it does not really solve my problem. When I delete a project from the navigation-view, the selection-view is not automatically updated. It still portrays the deleted project. Can any-one help me to update this view after I perform some certain actions?

Thanks, Enrique
Re: updating a viewer of a view from another view [message #467430 is a reply to message #467413] Thu, 03 May 2007 18:41 Go to previous messageGo to next message
jmi is currently offline jmiFriend
Messages: 84
Registered: July 2009
Member
Well, here is what you are looking for: IPropertyChangeListener

Make your Eclipse applications richer with view linking
It's easy to link UI views and adapt view linking to non-UI settings

http://www-128.ibm.com/developerworks/opensource/library/os- ecllink/

I use that to update a view when i save/update/delete data from an editor.

HTH

JMi
Re: updating a viewer of a view from another view [message #467445 is a reply to message #467430] Thu, 03 May 2007 23:22 Go to previous messageGo to next message
eric is currently offline ericFriend
Messages: 8
Registered: July 2009
Junior Member
First of all, I want to express my gratitude fro the prompt reply. I am working on a project and I am facing a lot of time pressure. I therefore want to plead any body to give me a concrete example on how he used the IPropertyListener.

Thanks again,
Enrique
Re: updating a viewer of a view from another view [message #467470 is a reply to message #467445] Fri, 04 May 2007 11:07 Go to previous message
eric is currently offline ericFriend
Messages: 8
Registered: July 2009
Junior Member
Thank you very much for your help. I have solved the problem. It is not very professional, but it functions. Since the views number 2 and 3 only show children and grand children of the parent selected in view 1, I noticed that, when I select a parent and then delete, an ArrayOutOfBound Exception is thrown. I then catch this exception and exactly there, I set the Array of the viewer.setInput to 0. This solves the problem.

The solution is not very professional, but it might help anyone facing the same problems I have been facing.

Regards,
Enrique
Previous Topic:adding a 'int getOffset()' to ICharacterScanner?
Next Topic:Eclipse 3.3 features
Goto Forum:
  


Current Time: Tue Sep 24 15:23:05 GMT 2024

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

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

Back to the top