IPartListener lifecycle question [message #330567] |
Sat, 02 August 2008 23:08 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: no.ddress.now
Specifically, is #getViewReference guaranteed to become valid between
#partOpen and #partActivated, or is using #partActivated just better at
concealing a race condition to when #getViewReference is valid.
Here is the problem: I have a set of Views that all must track and
update based on which other members of the set are open or closed. All
Views init with
getSite().getPage().addPartListener(viewPartListener);
and check on #partOpen and #partClosed for the existing set of Views
getViewSite().getPage().getViewReferences();
On platform start-up, the correct set of ViewReferences is returned
following from the #partOpen event. Yet when views are manually
opened, #partOpen/#getViewReference returns an incorrect set: it omits
the view that is then in the process of being opened.
If I switch to using #partActivated/#getViewReference, the correct set
of ViewReferences *appears* to be returned both on platform start-up
and on manually opening Views. So, can I rely on using #partActivated/
#getViewReference to alway work corrctly?
|
|
|
|
Powered by
FUDForum. Page generated in 1.27605 seconds