Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » ViewPart.saveState(..) not called
ViewPart.saveState(..) not called [message #444914] Thu, 23 February 2006 19:42 Go to next message
Eclipse UserFriend
I am new to RCP and have bumped into two probably related problems. The
simple application that I have created launches correctly and runs without
any errors. However when I shutdown the saveState() method in my view
(extends ViewPart) is not getting called. Where should this be called
from? Are the suggestions for what I should look into?

Second and possibly related, I have also implemented the init method with
both the IViewSite and IMemento parameters and the IMemento parameter
passed to the init method is null. Suggestions on this?

thanks,
Chris Marshall
Re: ViewPart.saveState(..) not called [message #444926 is a reply to message #444914] Fri, 24 February 2006 08:25 Go to previous message
Eclipse UserFriend
You need to call WorkbenchConfigurer#setSaveAndRestore(true);

When you do that, then saveState(*) will be called on shutdown and the
init(*) IMemento won't be null on startup.

And just a note, saveState(*) is called on session shutdown (i.e. close
the app), but if you just get rid of the view, it's not called.

Later,
PW
Previous Topic:How can I set the number of default perspectives ?
Next Topic:Updating the status line
Goto Forum:
  


Current Time: Mon Jul 14 22:37:39 EDT 2025

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

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

Back to the top