[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: Focus on ViewPart

Another similar need.
I have several related views.
When I open view2 from view1 is easy to get a reference to view2 from view1.
But if the user restarts the app and the view layout is restored, view1 cannot know if view2 is already opened, in order to update its contents based on view1 selection.


The workaround I use know is to detect view2 by means of IPartListener.
Is there any better alternative?
Thanks in advance for any tip.

Paul Webster wrote:

IPartListener2 (which can be added to the active page) will call partActivated(*) when a part has focus. IPartService#getActivePart(*) will tell you which part currently is active.

PW