I have a perspective containing a top view and a folder with two stacked views:
The views in the folder all need to update when a selection is made in the top view. This is accomplished by adding a selection listener. However, only the view that is actually shown reacts on the selection. When I select another view, it is still empty.
The code that adds the selection listener is placed in the view’s init() method and apparently this is only called for the first view in the folder when the perspective is loaded.
Is there a way to switch off this “lazy loading” so that all views are created (and their init() method called) when the perspective is created?
Thanks in advance for any help,
This is not a bug, it is a feature.
Eclipse greatly benefits from this behaviour as not all plugins/views/etc. are loaded as long as they are not really needed. This is the reason why your listeners are that lately registered (as soon as the view content is really created).
But back to your problem:
You could try to create/activate all of them manually.
Simply call
for every one of them.
If they are not activated and brought to front (but shown in the backround of the stack) then take a look at the overloaded showView() method with secID (can be null) and an additional specific mode flag.