Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Question about WorkbenchWindows and Perspectives(SaveAndRestore Perspective WorkbenchWindow RCP)
Question about WorkbenchWindows and Perspectives [message #521217] Tue, 16 March 2010 14:35 Go to next message
Eclipse UserFriend
I am building an RCP with several perspectives, each of them shown in an own WorkbenchWindow. I want do the following: Ad Startup I give as a commandline argument (-perspective) , which perspective should open. I want only one Window with the given perspective opening at startup time. When closing the workbench, it is not yet determened which perspective will be used next startup. The Problem is that either I can handle this, but then the state of the perspectives is not saved or I can save the state but then always the last saved state is restored. Has anyone a solution for this?
Re: Question about WorkbenchWindows and Perspectives [message #521390 is a reply to message #521217] Wed, 17 March 2010 04:42 Go to previous message
Eclipse UserFriend
You're seeing the 2 supported behaviours, either we don't save the
workbench state, or we save it exactly.

2 things come to mind

1) on startup look at the argument, and get rid of every
window/perspective that doesn't match. There's a postStartup method in
the workbench advisor

2) don't use save and restore, but on shutdown save each open
perspective as a custom perspective to that ID. Then on startup it
should hopefully open the custom perspective as it was saved on
shutdown. See org.eclipse.ui.IWorkbenchPage.savePerspective()

There might be more options, but I can't think of them
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
Previous Topic:Classloader not work on RCP
Next Topic:ACTION_ARRANGE_ALL: how to execute it from custom Action?
Goto Forum:
  


Current Time: Fri Jun 13 12:33:27 EDT 2025

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

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

Back to the top