Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Force loading of a stacked view
Force loading of a stacked view [message #534861] Thu, 20 May 2010 14:06 Go to next message
AvH  is currently offline AvH
Messages: 7
Registered: April 2010
Junior Member
Hi,

I'd like to have a view initialized even if it is hidden (stacked) behind another view, in order to update its icon. Some more details about this:

I added a view to my app which is stacked behind another one by default. This view should offer two functionalities:

a) The view's icon should become colored if data becomes available.

b) The view should then offer some overview over the data, and contain a button to start further processing.

When the app starts, it must be initialized to check if data is available, and update its icon. But since it is stacked behind another view, it will not do so until clicked.

I tried to add some code to the perspective, getting thew view from the ViewRegistry and create it manually, which did not work. Also, implementing the IStartup interface and adding the view to the startup extension point has no effect.

I must have missed something. Please give me a hint!

Thanks,
Alexander
Re: Force loading of a stacked view [message #534932 is a reply to message #534861] Thu, 20 May 2010 16:03 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Data processing should be part of, well, data processing. When data
becomes available it should contact your view (it can ask to create it
at that time).

But you can create a view without activating it using
org.eclipse.ui.IWorkbenchPage.showView(String, String, int) and one of
the appropriate contstants.

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


icon14.gif  Re: Force loading of a stacked view (solved) [message #535028 is a reply to message #534932] Fri, 21 May 2010 06:53 Go to previous message
AvH  is currently offline AvH
Messages: 7
Registered: April 2010
Junior Member
Paul Webster wrote on Thu, 20 May 2010 12:03
Data processing should be part of, well, data processing. When data
becomes available it should contact your view (it can ask to create it
at that time).


Of course you're right. I definitely will tidy this up.

Quote:

But you can create a view without activating it using
org.eclipse.ui.IWorkbenchPage.showView(String, String, int) and one of
the appropriate contstants.



Yes, that works perfectly. Thank you!

Cheers,
Alexander
Previous Topic:Specifying file to open on command line of RCP editor
Next Topic:Infinity job to refresh UI leads to memory leak
Goto Forum:
  


Current Time: Thu Oct 30 23:58:18 GMT 2014

Powered by FUDForum. Page generated in 0.01896 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software