Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Save/Restore workbench and view state
Save/Restore workbench and view state [message #256673] Tue, 29 June 2004 14:13 Go to next message
Eclipse UserFriend
Originally posted by: elvis.graceland.com

Two separate questions:

1.) I have a view that needs to save and restore state. I've overridden
ViewPart's init method to capture the IMemento obj which I intend to use in
createPartControl. The problem I have is that the IMemento is always null.

public void init(IViewSite site, IMemento memento) throws PartInitException
{
super.init(site);
// memento is always null !!!
}


2.) How do I instruct the workbench to persist and restore it's state (ie:
layout of current perspective, location and bounds of workbench window,
etc)? How does this mesh with my IPerspectiveFactory's createInitialLayout
method?

Thanks.
Re: Save/Restore workbench and view state [message #256802 is a reply to message #256673] Tue, 29 June 2004 18:45 Go to previous message
Eclipse UserFriend
Originally posted by: elvis.graceland.com

Found the answer to both questions. I needed to do the following in my
WorkbenchAdvisor subclass:

public void initialize(IWorkbenchConfigurer configurer) {
configurer.setSaveAndRestore(true);
super.initialize(configurer);
}

I didn't realize that I need to invoke setSaveAndRestore so early in the
startup!
Previous Topic:How to abort an Eclipse-RCP during startup?
Next Topic:Diable a TabItem
Goto Forum:
  


Current Time: Sat Oct 19 11:05:17 GMT 2024

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

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

Back to the top