Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 12:00 Go to next message
Kim Myoungki is currently offline Kim MyoungkiFriend
Messages: 12
Registered: July 2009
Junior Member

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?


Re: workbench.xml reloading [message #524328 is a reply to message #522893] Wed, 31 March 2010 14:03 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

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.

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 :-)


Paul Webster .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 May 18 17:00:28 GMT 2024

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

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

Back to the top