Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Switching Presentations on the fly, programmatically? (Is it possibly to switch presentatiosn on the fly?)
Switching Presentations on the fly, programmatically? [message #554288] Fri, 20 August 2010 18:49 Go to next message
eshvar60  is currently offline eshvar60
Messages: 51
Registered: March 2010
Member
Hey guys,

So I have a core plug-in which includes other plug-ins(modules). Each module has it's own perspective and I want each module to define its own presentation factory so it can customize its own views. Is this possible programmatically?

So in my ModulePerspective.createInitialLayout I can do:
PlatformUI.getPreferenceStore().setDefault(IWorkbenchPreferenceConstants.PRESENTATION_FACTORY_ID, "modulePresFactory");


But this will not actually cause the new presentation to be loaded. Any ideas on how to make this happen?

Thanks again!
Re: Switching Presentations on the fly, programmatically? [message #554795 is a reply to message #554288] Tue, 24 August 2010 08:30 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6850
Registered: July 2009
Location: Ottawa
Senior Member

There's one presentation for the workbench, and it must be available
before the stacks are created.

If you want per presentation modularity you must write one presentation
that is extensible by you, and have that manage which stacks to create
per presentation.

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


Re: Switching Presentations on the fly, programmatically? [message #554898 is a reply to message #554795] Tue, 24 August 2010 12:29 Go to previous messageGo to next message
eshvar60  is currently offline eshvar60
Messages: 51
Registered: March 2010
Member
Thanks again Paul. I did just what you said.

Also I am allowing every module to contribute it's own presentation. This is done via an extension point from my platform module.
If anyone has interest in this PM me and I will post the solution!

Thanks!
Re: Switching Presentations on the fly, programmatically? [message #556599 is a reply to message #554898] Wed, 01 September 2010 23:18 Go to previous messageGo to next message
boyeestudio is currently offline boyeestudio
Messages: 9
Registered: July 2009
Junior Member
eshvar60, pls post your solution.

I have a problem that when I switch a perspective, I always get a error dialog:

Problems opening perspective "xxxx.perspecitve".

How to fix this?

thank you very much!
Re: Switching Presentations on the fly, programmatically? [message #556753 is a reply to message #556599] Thu, 02 September 2010 10:12 Go to previous message
eshvar60  is currently offline eshvar60
Messages: 51
Registered: March 2010
Member
Hey Boyee,

Are you looking for a solution to custom presentations or just general information about switching perspectives?

Perhaps you should post your code/error in a new topic for that?
Previous Topic:Export Product into workspace location
Next Topic:Changing Perspective
Goto Forum:
  


Current Time: Sun Apr 20 19:47:03 EDT 2014

Powered by FUDForum. Page generated in 0.01754 seconds