Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Access view in other perspective.
Access view in other perspective. [message #1396446] Tue, 08 July 2014 05:59 Go to next message
Thomas Zwickl is currently offline Thomas Zwickl
Messages: 10
Registered: May 2014
Junior Member
Hello,

I have an eclipse RCP application based on the 3.x API. The application consists of several perspective and each perspective has some views and editors. My problem is now that I have one main perspective where you can start a traversing process which takes a lot of time and runs in a background process. During this traversing you can switch the perspective so you can do some other work, but when the traversing is finished I need to update the tree viewers in the first perspective to display the result, but somehow I cannot find the instances of the respective views of the first perspective when I call the method findView(ViewID) ...
When I debug I can see all the views from all my perspectives and also those I need to update but when I call the findView method it only returns null ... It seems that it only works when I'm in my main perspective where the views to be updated are but not when I'm in one of the other perspectives ...
Is there a way I can access the views from an other perspective or how else could I solve this problem?

Thanks in advance for any help you can offer Wink

Best regards,
Tom
Re: Access view in other perspective. [message #1396702 is a reply to message #1396446] Tue, 08 July 2014 13:10 Go to previous message
Brian de Alwis is currently offline Brian de Alwis
Messages: 177
Registered: January 2012
Senior Member

A view is shared between the perspectives within the window; there aren't multiple instances.

Rather than finding and explicitly refreshing your view parts, which is quite brittle (what if a user has closed one of your viewparts?), I'd suggest you use a more MVC approach and instead have them change and listen to a common model. You can also look at the OSGi EventAdmin for broadcasting changes.

Brian.


Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Previous Topic:Change target of an action to another item
Next Topic:How do we add a combo control to the main toolbar and update it when a new editor is activated
Goto Forum:
  


Current Time: Fri Aug 22 19:35:36 EDT 2014

Powered by FUDForum. Page generated in 0.01737 seconds