Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » workbench.xml reloading(Is it possible to reload workbench.xml?)
workbench.xml reloading [message #522893] Wed, 24 March 2010 08:00 Go to next message
Eclipse UserFriend
Hello,

I am going to make layout save/load function without restarting application.

The usecase is like this.

1. User save perspective as an xml (maybe it will be same as workbench.xml)

2. There is another instance of application has other layout. In this application load xml file.

3. The layout (view, perspective) is reloaded and shown as the first application's layout.

For this, I have tried to use WorkbenchWindow.restoreState after closing all views and editors.

But it is not working properly.

Do you have any ideas?

Thanks

Myoungki
Re: workbench.xml reloading [message #524328 is a reply to message #522893] Wed, 31 March 2010 10:03 Go to previous message
Eclipse UserFriend
Your best bet is the save the state as a custom descriptor ... the
correct information will end up in the preference store.

Then in the other app, you can load that information into the preference
store and then load it into a PerspectiveDescriptor and then set that as
the active descriptor.

See
org.eclipse.ui.internal.Perspective.saveDescAs(IPerspectiveD escriptor),
org.eclipse.ui.internal.registry.PerspectiveRegistry.saveCus tomPersp(PerspectiveDescriptor,
XMLMemento), and org.eclipse.ui.IWorkbenchPage.resetPerspective()

This will be hard to get correct, so you're going to have to dig deep :-)

Later,
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:Modifying the behavior of the internal web browser
Next Topic:Searching free Plugin to display ER-Diagram of my database.
Goto Forum:
  


Current Time: Sat Jul 05 02:09:07 EDT 2025

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

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

Back to the top