IFolderLayout - All Views shall be created at application startup [message #666196] |
Tue, 19 April 2011 12:45 |
Missing name Mising name Messages: 3 Registered: April 2011 |
Junior Member |
|
|
Hi,
I have put two views inside an IFolderLayout. Both views are SelectionListeners to the Selection Service of the IWorkbenchPage.
When my application starts, only the view which is on top in the IFolderLayout receives an Selection event, and executes its selectionChanged(...) method. Obviously the hide view is not created, but I would like to make sure, that on startup all views in the IFolderLayout are created, and react on the Selection event. How to do this?
The idea is, that based on a selection in a view outside the IFolderLayout, all views inside the IFolderLayout do some job, for example load and show data in tables or similar tasks.
It would be cumbersome, for example having five or more views in an IFolderLayout, having to click on each of the tabs of the hidden views manually to make them work and able to receive Selection events.
Regards
|
|
|
Re: IFolderLayout - All Views shall be created at application startup [message #666202 is a reply to message #666196] |
Tue, 19 April 2011 13:05 |
|
On 04/19/2011 08:45 AM, nebojsa.lazic@gmx.de wrote:
The idea is, that based on a selection in a view outside the
> IFolderLayout, all views inside the IFolderLayout do some job, for
> example load and show data in tables or similar tasks.
> It would be cumbersome, for example having five or more views in an
> IFolderLayout, having to click on each of the tabs of the hidden views
> manually to make them work and able to receive Selection events.
Arguably, if the views aren't visible, then they shouldn't be doing
anything. That's just chewing up computational cycles for nothing.
When they are first instantiated they can get the current selection (so
they're in the correct state) and then add their selection listener for
future events.
But in an RCP app, you could use your WorkbenchWindowAdvisor postRestore
to instantiate the views using IWorkbenchPage#showView(*) with the
VIEW_CREATE flag.
PW
--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench.htm
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
|
|
|
|
Powered by
FUDForum. Page generated in 0.04076 seconds